tasks.py 文件源码

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

项目:minstances 作者: 0xa 项目源码 文件源码
def rsess():
    s = requests.Session()

    # Just so one random 500 doesn't break an uptime; two consecutive errors are
    # worrying though.
    s.mount('http://', HTTPAdapter(max_retries=MAX_RETRIES))
    s.mount('https://', HTTPAdapter(max_retries=MAX_RETRIES))
    s.headers.update({
        'User-Agent': USER_AGENT,
    })

    return s
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号