aiohttp(异步)
一、安装 aiohttp
pip install aiohttp二、HTTP 代理示例
import aiohttp
import asyncio
proxy = "http://username_custom_zone_US:password@us.ipwo.net:7878"
url = "http://ipinfo.io"
async def main():
async with aiohttp.ClientSession() as session:
async with session.get(
url,
proxy=proxy,
timeout=30
) as response:
print(await response.text())
asyncio.run(main())三、正常返回示例
四、高并发请求示例
五、常见问题
六、推荐开发建议
七、相关文章
最后更新于
这有帮助吗?
