Skip to content

Commit

Permalink
Merge pull request #242 from Gallaecio/serp-provider
Browse files Browse the repository at this point in the history
provider: add serp
  • Loading branch information
kmike authored Jan 20, 2025
2 parents bf58d54 + 4aa88b4 commit a52ab36
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/reference/inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Inputs

- :class:`zyte_common_items.ProductNavigation`

- :class:`zyte_common_items.Serp`

Additional inputs and input annotations are also provided:

Built-in inputs
Expand Down
5 changes: 5 additions & 0 deletions scrapy_zyte_api/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
AutoProductListPage,
AutoProductNavigationPage,
AutoProductPage,
AutoSerpPage,
CustomAttributes,
CustomAttributesMetadata,
CustomAttributesValues,
Expand All @@ -37,6 +38,7 @@
Product,
ProductList,
ProductNavigation,
Serp,
)
from zyte_common_items.fields import is_auto_field

Expand All @@ -60,6 +62,7 @@
ArticleNavigation: "articleNavigation",
JobPosting: "jobPosting",
JobPostingNavigation: "jobPostingNavigation",
Serp: "serp",
}
_AUTO_PAGES: Set[type] = {
AutoArticlePage,
Expand All @@ -70,6 +73,7 @@
AutoProductPage,
AutoProductListPage,
AutoProductNavigationPage,
AutoSerpPage,
}


Expand All @@ -93,6 +97,7 @@ class ZyteApiProvider(PageObjectInputProvider):
ProductList,
ProductNavigation,
Screenshot,
Serp,
}

def __init__(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_version():
"andi>=0.6.0",
"scrapy-poet>=0.22.3",
"web-poet>=0.17.0",
"zyte-common-items>=0.24.0",
"zyte-common-items>=0.27.0",
]
},
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ deps =
andi==0.6.0
scrapy-poet==0.22.3
web-poet==0.17.0
zyte-common-items==0.24.0
zyte-common-items==0.27.0

[testenv:pinned-extra]
basepython=python3.9
Expand Down

0 comments on commit a52ab36

Please sign in to comment.