TypeError: Constructor parameter should be str

原因:在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()
原文地址:https://www.cnblogs.com/qiaoer1993/p/14081118.html