HTTPX
一、安装 HTTPX
pip install httpx二、HTTP 代理示例
import httpx
proxyip = "http://username_custom_zone_US:password@us.ipwo.net:7878"
proxies = {
"http://": proxyip,
"https://": proxyip
}
url = "http://ipinfo.io"
with httpx.Client(
proxies=proxies,
timeout=30
) as client:
response = client.get(url)
print(response.text)三、正常返回示例
四、异步请求示例(推荐)
五、常见问题
IP 未变化
六、推荐开发建议
七、相关文章
最后更新于
这有帮助吗?
