tickets.py 文件源码

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

项目:reptile 作者: shawncan 项目源码 文件源码
def getHTMLCookies(url):
    """
    ????????
    """
    requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

    proxies = {
        "http": "http://36.111.205.166:80",
        "https": "http://36.111.205.166:80"
    }

    headers = {
        'user-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36',
    }

    try:
        r = requests.get(url, proxies=proxies, headers=headers, verify=False, timeout=20)
        r.raise_for_status()
        r.encoding = 'utf-8'
        return r.cookies
    except Exception:
        logger.exception("Download HTML Text failed")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号