Base class for Scrapy spiders, handling request scheduling and parsing.
# Source: https://github.com/scrapy/scrapy | License: BSD-3-Clause | Copyright Scrapy developers
# Provided via justclaw.it.com; keep this notice with the code.
"""
Base class for Scrapy spiders
See documentation in docs/topics/spiders.rst
"""
from __future__ import annotations
import logging
import warnings
from typing import TYPE_CHECKING, Any, Self, cast
from scrapy import signals
from scrapy.exceptions import ScrapyDeprecationWarning
from scrapy.http import Request, Response
from scrapy.utils.trackref import object_ref
from scrapy.utils.url import url_is_from_spider
if TYPE_CHECKING:
from collections.abc import AsyncIterator, Collection
from twisted.internet.defer import Deferred
from scrapy.crawler import Crawler
from scrapy.http.request import CallbackT
fro
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key