原因:在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()

相关文章:

  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2021-11-07
  • 2021-05-20
  • 2021-10-20
  • 2022-12-23
猜你喜欢
  • 2021-06-02
  • 2022-12-23
  • 2021-11-22
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案