Request.meta keys
Keys that can be defined in Request.meta
for
scrapy-zyte-api.
zyte_api
Default: False
zyte_api_automap
Default: ZYTE_API_TRANSPARENT_MODE
(False
)
zyte_api_default_params
Default: True
If set to False
, the values of ZYTE_API_AUTOMAP_PARAMS
and
ZYTE_API_DEFAULT_PARAMS
are ignored for this request.
zyte_api_provider
Default: {}
Sets Zyte API parameters to include into requests made by the scrapy-poet integration.
For example:
Request(
"https://example.com",
meta={
"zyte_api_provider": {
"requestCookies": [
{"name": "a", "value": "b", "domain": "example.com"},
],
}
},
)
See also ZYTE_API_PROVIDER_PARAMS
.
zyte_api_retry_policy
Default: ZYTE_API_RETRY_POLICY
(zyte_api.aio.retry.zyte_api_retrying
)
Determines the retry policy for Zyte API requests used to fulfill this request.
It must be a tenacity.AsyncRetrying
subclass or its import path as a
string.
Note
If you need your request to be serializable, e.g. to use
HttpCacheMiddleware
, you
must specify the import path of your retry policy class as a string,
because retry policies are not serializable.
See Retries.
zyte_api_session_enabled
Default: ZYTE_API_SESSION_ENABLED
Whether to use scrapy-zyte-api session management for the
request (True
) or not (False
).
zyte_api_session_location
Default: {}
See Initializing sessions for general information about location configuration and parameter precedence.
Example:
Request(
"https://example.com",
meta={
"zyte_api_session_location": {"postalCode": "10001"},
},
)
zyte_api_session_params
Default: {}
See Initializing sessions for general information about defining session initialization parameters and parameter precedence.
zyte_api_session_pool
Default: ""
Determines the ID of the session pool to assign to the request, overriding the default pool assignment logic.
See also