twhttp.py 文件源码

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

项目:twtxt 作者: buckket 项目源码 文件源码
def get_remote_status(sources, timeout=5.0):
    conn = aiohttp.TCPConnector(use_dns_cache=True)
    headers = generate_user_agent()
    with aiohttp.ClientSession(connector=conn, headers=headers, conn_timeout=timeout) as client:
        loop = asyncio.get_event_loop()
        result = loop.run_until_complete(process_sources_for_status(client, sources))
    return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号