QQQR 网络工具¶
HTTP 客户端适配器和工具。
封装 aiohttp.ClientSession 为 ClientAdapter,并提供 raise_for_status()、get_all_cookie() 和 use_mobile_ua() 以满足 QQQR 的 HTTP 通信需求。
- qqqr.utils.net.raise_for_status(response, *accept_code)¶
比
raise_for_status()更严格的检查器。- 参数:
response (
ClientResponse) -- 要检查的客户端响应。accept_code (
int) -- Overwrite codes that can be accepted, If not given, default is (200, )
- 抛出:
aiohttp.ClientResponseError -- 如果状态码不在
accept_code中
- qqqr.utils.net.ClientAdapter¶
ClientSession的别名