kajweb / wqxuetang_downloader

文泉学堂、悦读下载器 | 2020-02-16网站不再公益开放阅读,项目失效。
MIT License
219 stars 119 forks source link

你早点更啊,我手动加了cookie,好累 #33

Closed marzaha closed 4 years ago

marzaha commented 4 years ago
def initread( self ):
        url = "https://lib-nuanxin.wqxuetang.com/v1/read/initread?bid={}".format( self.bid );
        curl = get_value("urllib");
        headstr = {
        'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
        'Accept-Language':'zh-CN,zh;q=0.9,en;q=0.8',
        'Accept-Encoding': 'gzip, deflate, br',
        'User-Agent':' Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36',
        'Upgrade-Insecure-Requests':'1',
        'Connection':'keep-alive',
        'Host':'lib-nuanxin.wqxuetang.com',
        'Sec-Fetch-Mode': 'navigate',
        'Sec-Fetch-Site': 'none',
        'Sec-Fetch-User': '?1',
        'Cookie':'_gid=37932323894; _gidv=537efffb24efdsfsfs6d4c4b230a129; PHPSESSID=v5eq3t2i87ldadadadaddst; Hm_lvt_a84b27ffd87daa3273555205ef60df89=15801231246,158013758,158013054,158137507; Hm_lpvt_a84b27ffd87daa3273555205ef60df89=1580831213; acw_tc=b65cfd3915808333851232131239590aa0bc6819f05f1b00',};
        req= curl.request.Request(url, headers=headstr);
        request = curl.request.urlopen(req);
        data = request.read().decode("UTF-8");
        # {"data":[],"errcode":8003,"errmsg":"很抱歉,您访问的图书不存在"} #图书不存在
        bookInfo = json.loads( data );
        pages = bookInfo['data'];
        return pages;
kajweb commented 4 years ago

早就更了,他服务器可以打开后马上就更了

kajweb commented 4 years ago

20:35就更新了,嘿嘿嘿

marzaha commented 4 years ago

py业余选手,伤不起

wlbksy commented 4 years ago

能来个requests 读cookie的例子吗?不会写

kajweb commented 4 years ago

能来个requests 读cookie的例子吗?不会写

参考patch1

Kuoliang-Chung commented 4 years ago

能来个对 “HTTPError: HTTP Error 503”错误的解决么。我偶尔会出现这个错误。

kajweb commented 4 years ago

能来个对 “HTTPError: HTTP Error 503”错误的解决么。我偶尔会出现这个错误。

参考patch2

Kuoliang-Chung commented 4 years ago

才发现更新了,谢谢啦!

FirstKaiXin commented 4 years ago

image 这个是什么问题呢,书号是url后面的那串数字吧

kajweb commented 4 years ago

image 这个是什么问题呢,书号是url后面的那串数字吧

登录问题。