httpadapter.py 文件源码

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

项目:searx-stats2 作者: dalf 项目源码 文件源码
def get_connection():
    # pycurl initialization
    h = pycurl.Curl()

    # follow redirects
    h.setopt(pycurl.FOLLOWLOCATION, False)

    # enable compression
    h.setopt(pycurl.ENCODING, 'gzip, deflate')

    # certifi
    h.setopt(pycurl.CAINFO, certifi.where())

    # no signal
    h.setopt(pycurl.NOSIGNAL, 1)

    # certificate informations
    h.setopt(pycurl.OPT_CERTINFO, 1)

    return h
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号