原因:在asyncio和aiohttp请求时用的代理的格式错误了。
在requests请求中,代理proxies需要是字典格式,例如{"http": "http://14.67.8.20:2045"},但是在下面的里面需要proxy为字符串类型,例如:
async with session.get(url, proxy="http://14.67.8.20:2045") as response:
return await response.text()
原因:在asyncio和aiohttp请求时用的代理的格式错误了。
在requests请求中,代理proxies需要是字典格式,例如{"http": "http://14.67.8.20:2045"},但是在下面的里面需要proxy为字符串类型,例如:
async with session.get(url, proxy="http://14.67.8.20:2045") as response:
return await response.text()
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。