SubbedAnime.py 文件源码

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

项目:AnimeWatch 作者: kanishka-linux 项目源码 文件源码
def ccurl_setcookie(url):

    hdr = "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0"
    c = pycurl.Curl()
    c.setopt(c.FOLLOWLOCATION, True)
    c.setopt(c.USERAGENT, hdr)
    c.setopt(c.COOKIEJAR, '/tmp/AnimeWatch/cookie.txt')
    url = str(url)
    c.setopt(c.URL, url)
    storage = BytesIO()
    c.setopt(c.WRITEDATA, storage)
    c.perform()
    c.close()
    content = storage.getvalue()
    content = getContentUnicode(content)

    return (content)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号