mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2026-06-09 19:37:25 +08:00
docs: 将新增注释和文档改为中文
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -120,9 +120,8 @@ FONT_PATH = "./docs/STZHONGS.TTF"
|
|||||||
# Crawl interval
|
# Crawl interval
|
||||||
CRAWLER_MAX_SLEEP_SEC = 2
|
CRAWLER_MAX_SLEEP_SEC = 2
|
||||||
|
|
||||||
# Disable SSL certificate verification. Set to True only when running behind an intercepting
|
# 是否禁用 SSL 证书验证。仅在使用企业代理、Burp Suite、mitmproxy 等会注入自签名证书的中间人代理时设为 True。
|
||||||
# proxy (corporate gateway, Burp Suite, mitmproxy, etc.) that injects its own certificate.
|
# 警告:禁用 SSL 验证将使所有流量暴露于中间人攻击风险,请勿在生产环境中开启。
|
||||||
# WARNING: disabling SSL verification exposes all traffic to MITM attacks.
|
|
||||||
DISABLE_SSL_VERIFY = False
|
DISABLE_SSL_VERIFY = False
|
||||||
|
|
||||||
from .bilibili_config import *
|
from .bilibili_config import *
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ import config
|
|||||||
|
|
||||||
|
|
||||||
def make_async_client(**kwargs) -> httpx.AsyncClient:
|
def make_async_client(**kwargs) -> httpx.AsyncClient:
|
||||||
"""Create an httpx.AsyncClient with project-wide defaults.
|
"""创建统一配置的 httpx.AsyncClient。
|
||||||
|
|
||||||
Reads DISABLE_SSL_VERIFY from config (default False).
|
从配置文件读取 DISABLE_SSL_VERIFY(默认 False,即开启 SSL 验证)。
|
||||||
Set DISABLE_SSL_VERIFY = True in config/base_config.py only when running
|
仅在使用企业代理、Burp、mitmproxy 等中间人代理时才需将其设为 True。
|
||||||
behind an intercepting proxy (corporate gateway, Burp, mitmproxy, etc.).
|
|
||||||
"""
|
"""
|
||||||
kwargs.setdefault("verify", not getattr(config, "DISABLE_SSL_VERIFY", False))
|
kwargs.setdefault("verify", not getattr(config, "DISABLE_SSL_VERIFY", False))
|
||||||
return httpx.AsyncClient(**kwargs)
|
return httpx.AsyncClient(**kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user