Scrapy, a fast high-level web crawling & scraping framework for Python.
Docs improvements.
Andrey Rakhmatullin61e6bfc023e5
diff --git a/docs/topics/settings.rst b/docs/topics/settings.rstindex 65823e071..d3fe6bbe2 100644--- a/docs/topics/settings.rst+++ b/docs/topics/settings.rst@@ -115,7 +115,8 @@ arguments <spiderargs>` or other logic:@classmethoddef from_crawler(cls, crawler, *args, **kwargs):spider = super().from_crawler(crawler, *args, **kwargs)- spider.settings.set("SOME_SETTING", kwargs["value"], priority="spider")+ if "value" in kwargs:+ spider.settings.set("SOME_SETTING", kwargs["value"], priority="spider")return spider3. Project settings modulediff --git a/docs/topics/spiders.rst b/docs/topics/spiders.rstindex 4ed9b8dc3..d9cbbe35a 100644--- a/docs/topics/spiders.rst+++ b/docs/topics/spiders.rst@@ -138,11 +138,10 @@ scrapy.Spider.. versionchanged:: VERSION- The settings available in this method can now be modified, which is+ The settings in ``crawler.settings`` can now be modified, which ishandy if you want to modify them based on arguments. As a- consequence, the settings available in this method aren't the final- values as they can be modified later by e.g. :ref:`add-ons- <topics-addons>`.+ consequence, these settings aren't the final values as they can be+ modified later by e.g. :ref:`add-ons <topics-addons>`.:param crawler: crawler to which the spider will be bound:type crawler: :class:`~scrapy.crawler.Crawler` instance