Scrapy, a fast high-level web crawling & scraping framework for Python.
Go to file
Adnan Awan d2290c35c2
Allow configuring the log level of the retry give-up message (#7567)
* Allow configuring the log level of the retry give-up message

The "Gave up retrying ..." message was always logged at ERROR, which
inflates the log_count/ERROR stat even when giving up on a request is
expected (e.g. broad crawls hitting dead hosts).

Add a RETRY_GIVE_UP_LOG_LEVEL setting, a give_up_log_level argument to
get_retry_request(), and a give_up_log_level request meta key to override
it per request. The value accepts a level name ("WARNING") or number
(logging.WARNING). The default ("ERROR") preserves the previous behaviour.

Fixes #5297, fixes #4622

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Address Adrian's review feedback: simplify and reorganize docs

- Move give_up_log_level reqmeta section before max_retry_times (alphabetical order)
- Simplify give_up_log_level section in request-response.rst (brief, links to setting)
- Simplify RETRY_GIVE_UP_LOG_LEVEL setting docs in downloader-middleware.rst
- Change 'When initialized' to 'When set' in max_retry_times section
- Docs now follow pattern of linking to complementary setting/meta key rather than duplicating information

Per Adrian's feedback: keep docs concise and cross-link setting ↔ meta key

* Address Adrian's code review feedback on RETRY_GIVE_UP_LOG_LEVEL feature

- Fix alphabetical ordering of give_up_log_level in request-response.rst
- Remove circular references: change 'see X for details' to 'see also X' pattern
- Simplify docstring for give_up_log_level parameter (4 lines → 2 lines)
- Update test domains from www.scrapytest.org to example.com

* Apply suggestion from @AdrianAtZyte

* Minor changes

* Fix example formatting.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Adrian <adrian@zyte.com>
Co-authored-by: Andrey Rakhmatullin <wrar@wrar.name>
2026-06-08 18:44:30 +05:00
.github Add Python 3.14 to CI. (#6604) 2026-05-12 23:49:37 +05:00
docs Allow configuring the log level of the retry give-up message (#7567) 2026-06-08 18:44:30 +05:00
extras chore: simplify some code, get rid of nested fns where it's makes sence + pylint (#7401) 2026-05-04 23:32:46 +05:00
scrapy Allow configuring the log level of the retry give-up message (#7567) 2026-06-08 18:44:30 +05:00
sep Add sphinx-lint. (#6920) 2025-06-28 01:37:20 +02:00
tests Allow configuring the log level of the retry give-up message (#7567) 2026-06-08 18:44:30 +05:00
tests_typing Enable mypy warn_return_any. (#7492) 2026-05-04 22:24:47 +02:00
.git-blame-ignore-revs Update tool versions (#7127) 2025-10-27 14:11:31 +01:00
.gitattributes Maybe the problem is not in the code after all 2020-08-13 06:35:09 +02:00
.gitignore Add llms.txt and llms-full.txt generation (#7380) 2026-04-06 10:24:21 +02:00
.pre-commit-config.yaml sphinx-scrapy: 0.8.5 → 0.8.6 (#7507) 2026-05-12 12:49:23 +05:00
.readthedocs.yml Add Python 3.14 to CI. (#6604) 2026-05-12 23:49:37 +05:00
AUTHORS Scrapinghub → Zyte 2021-02-02 15:03:20 +01:00
CITATION.cff Add CITATION.cff (#7519) 2026-05-14 13:07:13 +02:00
CODE_OF_CONDUCT.md Update Code of Conduct to Contributor Covenant v2.1 2022-10-28 02:13:37 +02:00
CONTRIBUTING.md Be consistent with domain used for links to documentation website 2019-01-31 01:28:53 -03:00
INSTALL.md Update and rename INSTALL to INSTALL.md 2022-10-06 19:58:48 +02:00
LICENSE added oxford commas to LICENSE 2018-06-01 21:48:43 -03:00
NEWS added NEWS file pointing to docs/news.rst 2012-04-28 23:32:51 -03:00
README.rst Remove Python 3.9 support (#7121) 2025-10-27 12:37:49 +01:00
SECURITY.md Bump version: 2.15.2 → 2.16.0 2026-05-19 17:27:16 +05:00
codecov.yml codecov config: disable project check, tweak PR comments 2017-05-19 00:01:27 +05:00
conftest.py Cleanup/clarifications of proxy support and improvements for proxy tests (#7496) 2026-05-12 17:45:54 +05:00
pyproject.toml Work around coverage slowness on Python 3.14. (#7574) 2026-06-05 15:34:02 +02:00
tox.ini Support sending requests with "unsafe" URLs (#7473) 2026-06-05 11:51:03 +02:00

README.rst

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> </head>

Scrapy is a web scraping framework to extract structured data from websites. It is cross-platform, and requires Python 3.10+. It is maintained by Zyte (formerly Scrapinghub) and many other contributors.

Install with:

System Message: WARNING/2 (<stdin>, line 52)

Cannot analyze code. Pygments package not found.

.. code:: bash

    pip install scrapy

And follow the documentation to learn how to use it.

If you wish to contribute, see Contributing.

</html>