From 4cb049cb15207de0967e4c2b0ff2527e130f5662 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Thu, 11 Jun 2026 13:51:03 +0500 Subject: [PATCH] Small docs fixes. (#7598) --- docs/topics/coroutines.rst | 4 ++-- docs/topics/extensions.rst | 4 ++-- docs/topics/request-response.rst | 2 +- docs/topics/settings.rst | 3 +-- docs/topics/telnetconsole.rst | 2 -- scrapy/loader/__init__.py | 2 +- scrapy/shell.py | 4 ++-- scrapy/utils/reactor.py | 2 +- 8 files changed, 10 insertions(+), 13 deletions(-) diff --git a/docs/topics/coroutines.rst b/docs/topics/coroutines.rst index ba68f0dbc..116aac323 100644 --- a/docs/topics/coroutines.rst +++ b/docs/topics/coroutines.rst @@ -267,6 +267,6 @@ You can also send multiple requests in parallel: responses = await asyncio.gather(*tasks) yield { "h1": response.css("h1::text").get(), - "price": responses[0][1].css(".price::text").get(), - "price2": responses[1][1].css(".color::text").get(), + "price": responses[0].css(".price::text").get(), + "price2": responses[1].css(".color::text").get(), } diff --git a/docs/topics/extensions.rst b/docs/topics/extensions.rst index 735e46c29..5a05f67d9 100644 --- a/docs/topics/extensions.rst +++ b/docs/topics/extensions.rst @@ -149,8 +149,6 @@ The following stats are collected: (e.g. ``item_dropped_reasons_count/DropItem``). * ``response_received_count``: total number of HTTP responses received. -.. _topics-extensions-ref-telnetconsole: - Log Count extension ~~~~~~~~~~~~~~~~~~~ @@ -159,6 +157,8 @@ Log Count extension .. autoclass:: LogCount +.. _topics-extensions-ref-telnetconsole: + Telnet console extension ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/topics/request-response.rst b/docs/topics/request-response.rst index 8fd3de621..a0fff6acb 100644 --- a/docs/topics/request-response.rst +++ b/docs/topics/request-response.rst @@ -979,7 +979,7 @@ Response objects A dictionary-like (:class:`scrapy.http.headers.Headers`) object which contains the response headers. Values can be accessed using - :meth:`~scrapy.http.headers.Headers.get` to return the first header value with + :meth:`~scrapy.http.headers.Headers.get` to return the last header value with the specified name or :meth:`~scrapy.http.headers.Headers.getlist` to return all header values with the specified name. For example, this call will give you all cookies in the headers:: diff --git a/docs/topics/settings.rst b/docs/topics/settings.rst index 06de33e6f..455985a56 100644 --- a/docs/topics/settings.rst +++ b/docs/topics/settings.rst @@ -734,8 +734,7 @@ specific cipher that is not included in ``DEFAULT`` if a website requires it. Handling of this setting needs to be implemented inside the :ref:`download handler `, so it's not guaranteed to be supported - by all 3rd-party handlers. It's currently unsupported by - :class:`~scrapy.core.downloader.handlers._httpx.HttpxDownloadHandler`. + by all 3rd-party handlers. .. setting:: DOWNLOAD_TLS_MAX_VERSION diff --git a/docs/topics/telnetconsole.rst b/docs/topics/telnetconsole.rst index 6d99c756e..e274edc9b 100644 --- a/docs/topics/telnetconsole.rst +++ b/docs/topics/telnetconsole.rst @@ -94,8 +94,6 @@ convenience: +----------------+-------------------------------------------------------------------+ | ``p`` | a shortcut to the :func:`pprint.pprint` function | +----------------+-------------------------------------------------------------------+ -| ``hpy`` | for memory debugging (see :ref:`topics-leaks`) | -+----------------+-------------------------------------------------------------------+ Telnet console usage examples ============================= diff --git a/scrapy/loader/__init__.py b/scrapy/loader/__init__.py index 2f5c0343b..8ee7dc16c 100644 --- a/scrapy/loader/__init__.py +++ b/scrapy/loader/__init__.py @@ -27,7 +27,7 @@ class ItemLoader(itemloaders.ItemLoader): :param item: The item instance to populate using subsequent calls to :meth:`~ItemLoader.add_xpath`, :meth:`~ItemLoader.add_css`, or :meth:`~ItemLoader.add_value`. - :type item: scrapy.item.Item + :type item: :ref:`item object ` :param selector: The selector to extract data from, when using the :meth:`add_xpath`, :meth:`add_css`, :meth:`replace_xpath`, or diff --git a/scrapy/shell.py b/scrapy/shell.py index 8bb5994e3..44dcd880e 100644 --- a/scrapy/shell.py +++ b/scrapy/shell.py @@ -75,8 +75,8 @@ if TYPE_CHECKING: # running event loop. # # Side note: it should be possible to remove _request_deferred() by using -# engine.download() instead of engine.schedule(), losing the usual stuff like -# spider middlewares (none of which should be important). +# engine.download_async() instead of engine.schedule(), losing the usual stuff +# like spider middlewares (none of which should be important). # # Other architecture problems: # * scrapy.cmdline.execute() creates an AsyncCrawlerProcess instance which diff --git a/scrapy/utils/reactor.py b/scrapy/utils/reactor.py index c60bb215d..5499e3f48 100644 --- a/scrapy/utils/reactor.py +++ b/scrapy/utils/reactor.py @@ -187,7 +187,7 @@ def verify_installed_reactor(reactor_path: str) -> None: def verify_installed_asyncio_event_loop(loop_path: str) -> None: - """Raise :exc:`RuntimeError` if the even loop of the installed + """Raise :exc:`RuntimeError` if the event loop of the installed :class:`~twisted.internet.asyncioreactor.AsyncioSelectorReactor` does not match the specified import path or if no reactor is installed.""" if not is_reactor_installed():