Update http_utils.py

This commit is contained in:
HibiKier 2022-06-14 19:22:12 +08:00 committed by GitHub
parent c8a7d855f8
commit d4ec0df00c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ class AsyncHttpx:
if not headers:
headers = get_user_agent()
proxy = proxy if proxy else cls.proxy if use_proxy else None
async with httpx.AsyncClient(proxies=proxy,verify=verify) as client:
async with httpx.AsyncClient(proxies=proxy, verify=verify) as client:
return await client.get(
url,
params=params,
@ -98,7 +98,7 @@ class AsyncHttpx:
if not headers:
headers = get_user_agent()
proxy = proxy if proxy else cls.proxy if use_proxy else None
async with httpx.AsyncClient(proxies=proxy,verify=verify) as client:
async with httpx.AsyncClient(proxies=proxy, verify=verify) as client:
return await client.post(
url,
content=content,
@ -172,7 +172,7 @@ class AsyncHttpx:
headers = get_user_agent()
proxy = proxy if proxy else cls.proxy if use_proxy else None
try:
async with httpx.AsyncClient(proxies=proxy,verify=verify) as client:
async with httpx.AsyncClient(proxies=proxy, verify=verify) as client:
async with client.stream(
"GET",
url,