Skip to content

Commit

Permalink
return back extract_from=None by default
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnzZ committed Feb 5, 2024
1 parent e066993 commit 53b9dfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
21 changes: 4 additions & 17 deletions tests/test_ecommerce.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,36 +286,23 @@ def test_arguments():
"ZYTE_API_PROVIDER_PARAMS",
None,
"getdict",
{
"geolocation": "DE",
"productOptions": {"extractFrom": "browserHtml"},
"productNavigationOptions": {"extractFrom": "browserHtml"},
},
{"geolocation": "DE"},
),
(
"geolocation",
"DE",
"ZYTE_API_PROVIDER_PARAMS",
'{"browserHtml": true}',
"getdict",
{
"browserHtml": True,
"geolocation": "DE",
"productOptions": {"extractFrom": "browserHtml"},
"productNavigationOptions": {"extractFrom": "browserHtml"},
},
{"browserHtml": True, "geolocation": "DE"},
),
(
"geolocation",
"DE",
"ZYTE_API_PROVIDER_PARAMS",
'{"geolocation": "IE"}',
"getdict",
{
"geolocation": "DE",
"productOptions": {"extractFrom": "browserHtml"},
"productNavigationOptions": {"extractFrom": "browserHtml"},
},
{"geolocation": "DE"},
),
(
"extract_from",
Expand Down Expand Up @@ -394,7 +381,7 @@ def test_metadata():
},
"extract_from": {
"anyOf": [{"type": "string"}, {"type": "null"}],
"default": "browserHtml",
"default": None,
"title": "Extraction source",
"description": (
"Whether to perform extraction using a browser request "
Expand Down
2 changes: 1 addition & 1 deletion zyte_spider_templates/spiders/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class BaseSpiderParams(BaseModel):
"Whether to perform extraction using a browser request "
"(browserHtml) or an HTTP request (httpResponseBody)."
),
default=ExtractFrom.browserHtml,
default=None,
json_schema_extra={
"enumMeta": {
ExtractFrom.browserHtml: {
Expand Down

0 comments on commit 53b9dfd

Please sign in to comment.