asyncio_module.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:Python_Study 作者: thsheep 项目源码 文件源码
def getPage(url, res_list):
    print(url)
    headers = {'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}
    # conn = aiohttp.ProxyConnector(proxy="http://127.0.0.1:8087")
    async with aiohttp.ClientSession() as session:
        async with session.get(url, headers=headers) as resp:
            assert resp.status == 200
            res_list.append(await resp.text())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号