MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / make_async_client

Function make_async_client

tools/httpx_util.py:6–13  ·  view source on GitHub ↗

创建统一配置的 httpx.AsyncClient。 从配置文件读取 DISABLE_SSL_VERIFY(默认 False,即开启 SSL 验证)。 仅在使用企业代理、Burp、mitmproxy 等中间人代理时才需将其设为 True。

(**kwargs)

Source from the content-addressed store, hash-verified

4
5
6def make_async_client(**kwargs) -> httpx.AsyncClient:
7 """创建统一配置的 httpx.AsyncClient。
8
9 从配置文件读取 DISABLE_SSL_VERIFY(默认 False,即开启 SSL 验证)。
10 仅在使用企业代理、Burp、mitmproxy 等中间人代理时才需将其设为 True。
11 """
12 kwargs.setdefault("verify", not getattr(config, "DISABLE_SSL_VERIFY", False))
13 return httpx.AsyncClient(**kwargs)

Callers 15

_is_valid_proxyMethod · 0.90
get_proxyMethod · 0.90
get_proxyMethod · 0.90
get_proxyMethod · 0.90
requestMethod · 0.90
requestMethod · 0.90
get_video_mediaMethod · 0.90
requestMethod · 0.90
get_note_info_by_idMethod · 0.90
get_note_imageMethod · 0.90
requestMethod · 0.90
request_rest_v2Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected