MCPcopy
hub / github.com/scrapy/scrapy / __init__

Method __init__

scrapy/core/downloader/handlers/http2.py:35–45  ·  view source on GitHub ↗
(self, crawler: Crawler)

Source from the content-addressed store, hash-verified

33 lazy = True
34
35 def __init__(self, crawler: Crawler):
36 if not crawler.settings.getbool("TWISTED_REACTOR_ENABLED"):
37 raise NotConfigured(f"{type(self).__name__} requires a Twisted reactor.")
38 super().__init__(crawler)
39 self._crawler = crawler
40
41 from twisted.internet import reactor
42
43 self._pool = H2ConnectionPool(reactor, crawler.settings)
44 self._context_factory = _load_context_factory_from_settings(crawler)
45 self._bind_address = crawler.settings.get("DOWNLOAD_BIND_ADDRESS")
46
47 async def download_request(self, request: Request) -> Response:
48 if urlparse_cached(request).scheme == "http": # pragma: no cover

Callers

nothing calls this directly

Calls 6

NotConfiguredClass · 0.90
H2ConnectionPoolClass · 0.90
getboolMethod · 0.45
__init__Method · 0.45
getMethod · 0.45

Tested by

no test coverage detected