MCPcopy
hub / github.com/scrapy/scrapy / _get_client

Method _get_client

scrapy/core/downloader/handlers/_httpx.py:103–110  ·  view source on GitHub ↗
(self, proxy_url: str | None)

Source from the content-addressed store, hash-verified

101 return client
102
103 def _get_client(self, proxy_url: str | None) -> httpx.AsyncClient:
104 if proxy_url is None:
105 return self._default_client
106 if cached := self._proxy_clients.get(proxy_url):
107 return cached
108 client = self._make_client(proxy_url)
109 self._proxy_clients[proxy_url] = client
110 return client
111
112 @asynccontextmanager
113 async def _make_request(

Callers 1

_make_requestMethod · 0.95

Calls 2

_make_clientMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected