Inputs
scrapy-poet integration, if enabled during the initial setup, allows obtaining the following inputs from web-poet and zyte-common-items through Zyte API:
web_poet.BrowserHtml
web_poet.BrowserResponse
web_poet.AnyResponse
This re-uses either
web_poet.BrowserResponse
(takes priority) orweb_poet.HttpResponse
if they’re available.If neither is available, it would use
web_poet.HttpResponse
requested from Zyte API. However, if other item inputs (e.g.zyte_common_items.Product
) are present, it would requestweb_poet.BrowserResponse
from Zyte API unless an extraction source is provided.
Additional inputs and input annotations are also provided:
Built-in inputs
- class scrapy_zyte_api.Actions(results: List[_ActionResult] | None)[source]
A page input that specifies browser actions and contains their results.
The actions must be specified with an annotation using
actions()
.
- class scrapy_zyte_api.Geolocation[source]
A page input that forces a given geolocation for all other page inputs.
The target geolocation must be specified with an annotation.
Built-in input annotations
- enum scrapy_zyte_api.ExtractFrom(value)[source]
Annotation to specify the extraction source of an automatic extraction input, such as
Product
orArticle
.- Member Type:
Valid values are as follows: