kajweb / wqxuetang_downloader

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

现在是不是爬不了了? #68

Closed Kuoliang-Chung closed 4 years ago

Kuoliang-Chung commented 4 years ago

报错如下: C:\Users\83669\Desktop\wqxuetang_downloader-master>python main.py -b 3209132 Traceback (most recent call last): File "main.py", line 58, in book = wqxtDownloader( bid ); File "C:\Users\83669\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 38, in init self.kData = self.getK(); File "C:\Users\83669\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 112, in getK kInfo = json.loads( data ); File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\json__init__.py", line 348, in loads return _default_decoder.decode(s) File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

lovejun277 commented 4 years ago

我这里正常 就是20秒太慢了

------------------ 原始邮件 ------------------ 发件人: "Guoliang-Zhong"<notifications@github.com>; 发送时间: 2020年2月8日(星期六) 上午10:53 收件人: "kajweb/wqxuetang_downloader"<wqxuetang_downloader@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [kajweb/wqxuetang_downloader] 现在是不是爬不了了? (#68)

报错如下: C:\Users\83669\Desktop\wqxuetang_downloader-master>python main.py -b 3209132 Traceback (most recent call last): File "main.py", line 58, in book = wqxtDownloader( bid ); File "C:\Users\83669\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 38, in init self.kData = self.getK(); File "C:\Users\83669\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 112, in getK kInfo = json.loads( data ); File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\jsoninit.py", line 348, in loads return _default_decoder.decode(s) File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

Kuoliang-Chung commented 4 years ago

我这里正常 就是20秒太慢了 ------------------ 原始邮件 ------------------ 发件人: "Guoliang-Zhong"<notifications@github.com>; 发送时间: 2020年2月8日(星期六) 上午10:53 收件人: "kajweb/wqxuetang_downloader"<wqxuetang_downloader@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [kajweb/wqxuetang_downloader] 现在是不是爬不了了? (#68) 报错如下: C:\Users\83669\Desktop\wqxuetang_downloader-master>python main.py -b 3209132 Traceback (most recent call last): File "main.py", line 58, in book = wqxtDownloader( bid ); File "C:\Users\83669\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 38, in init self.kData = self.getK(); File "C:\Users\83669\Desktop\wqxuetang_downloader-master\wqxtDownloader.py", line 112, in getK kInfo = json.loads( data ); File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\jsoninit.py", line 348, in loads return _default_decoder.decode(s) File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\83669\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

那应该是我用的方法不对,我看看怎么回事。 下载快了就会被封IP的。。。

Kuoliang-Chung commented 4 years ago

我还是不知道什么原因啊,作者能不能帮我看一下呀

Kuoliang-Chung commented 4 years ago

莫名奇妙可以了。。。

xmdt commented 4 years ago

建议抓取页面的间隔时间平均在10s左右基本上就没有报错的了。