Scrapy-zyte-api

Latest version: v0.20.0

Safety actively analyzes 641134 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

0.20.0

-------------------

* If the :setting:`AUTOTHROTTLE_ENABLED <scrapy:AUTOTHROTTLE_ENABLED>` setting
is ``False``, the delay of download slots for Zyte API requests no longer
resets to zero, and instead scrapy-zyte-api respects the
:setting:`DOWNLOAD_DELAY <scrapy:DOWNLOAD_DELAY>` setting and
``zyte-api``-prefixed entries in the :setting:`DOWNLOAD_SLOTS
<scrapy:DOWNLOAD_SLOTS>` setting.

A new :setting:`ZYTE_API_PRESERVE_DELAY` setting allows overriding this
behavior, i.e. enabling delay resetting even if
:setting:`AUTOTHROTTLE_ENABLED <scrapy:AUTOTHROTTLE_ENABLED>` is ``False`` or
disabling delay resetting even if :setting:`AUTOTHROTTLE_ENABLED
<scrapy:AUTOTHROTTLE_ENABLED>` is ``True``.

* The :reqmeta:`zyte_api_session_location` and
:reqmeta:`zyte_api_session_params` request metadata keys, if present in a
request that triggers a session initialization request, will be copied into
the session initialization request, so that they are available when
:setting:`ZYTE_API_SESSION_CHECKER` or :meth:`SessionConfig.check
<scrapy_zyte_api.SessionConfig.check>` are called for a session
initialization request.

* The new :meth:`SessionConfig.enabled <scrapy_zyte_api.SessionConfig.enabled>`
method allows configuring whether session management should be enabled or
disabled for any given request.

* A new stat, ``scrapy-zyte-api/sessions/use/disabled``, indicates the number
of requests for which session management was disabled.

0.19.0

-------------------

* Implemented a :ref:`session management API <session>`.

* The recommended position for ``ScrapyZyteAPIDownloaderMiddleware`` changed
from 1000 to 633, to accommodate for the new
``ScrapyZyteAPISessionDownloaderMiddleware``, which needs to be after
``ScrapyZyteAPIDownloaderMiddleware`` and before the Scrapy cookie downloader
middleware (700).

0.18.4

-------------------

* Now the :setting:`ZYTE_API_PROVIDER_PARAMS` setting and the
:reqmeta:`zyte_api_provider` request metadata key can influence the
resolution of an :class:`~web_poet.page_inputs.response.AnyResponse`
dependency.

0.18.3

-------------------

* The log messages from the download handler that indicate the source request
URL of an exception have switched from ``ERROR`` log level to ``DEBUG``. The
exceptions themselves that follow those messages will still be logged as
errors unless you handle them.

0.18.2

-------------------

* The ``Accept``, ``Accept-Encoding``, ``Accept-Language``, and ``User-Agent``
headers are now dropped automatically during :ref:`header mapping
<header-mapping>` unless they have user-defined values. This fix can improve
success rates on some websites when using :ref:`HTTP requests
<zyte-api-http>`.

0.18.1

-------------------

* ``extractFrom`` in :reqmeta:`zyte_api_provider` or
:setting:`ZYTE_API_PROVIDER_PARAMS` overrides
:class:`~scrapy_zyte_api.ExtractFrom` annotations.

Page 1 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.