Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

docs: update

Jalil SA96d51c3afa97
diff --git a/docs/topics/spiders.rst b/docs/topics/spiders.rst
index d501466de..22bbf2ce4 100644
--- a/docs/topics/spiders.rst
+++ b/docs/topics/spiders.rst
@@ -145,23 +145,24 @@ scrapy.Spider
:param kwargs: keyword arguments passed to the :meth:`__init__` method
:type kwargs: dict
- .. method:: update_settings(cls, settings)
+ .. classmethod:: update_settings(settings)
The ``update_settings()`` method is used to modify the spider's settings
and can be called during initialization of a spider instance.
- It takes a ``Settings`` object as a parameter and adds or updates the spider's
- configuration values. This method is a class method, meaning that it is
- called on the Spider class and allows all instances of the Spider to share
- the same configuration.
+ It takes a :class:`~scrapy.settings.Settings` object as a parameter and
+ adds or updates the spider's configuration values. This method is a class method,
+ meaning that it is called on the :class:`~scrapy.Spider` class and allows all instances
+ of the spider to share the same configuration.
- To create class hierarchies for spiders, it is recommended to use the ``custom_settings``
+ To create class hierarchies for spiders, it is recommended to use the :attr:`custom_settings`
attribute instead of ``update_settings()``, as it allows for default settings to be
defined and automatically inherited by subclasses.
- For example, suppose a MySpider needs update FEEDS:
+ For example, suppose a spider needs update :setting:`FEEDS`:
.. code-block:: python
+
import scrapy