echowxsy / cmpedudownload Goto Github PK
View Code? Open in Web Editor NEW机械工业出版社PDF下载器
License: MIT License
机械工业出版社PDF下载器
License: MIT License
[1] 1314
[root@spider CMPEDUDownload]# Traceback (most recent call last):
File "download.py", line 49, in
main()
File "download.py", line 45, in main
print("%s\n\treferer=%s\n\tout=%s" % (pdf_link, referer, saved_path))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 227-230: ordinal not in range(128)
我使用windows版本的aria2c,无法下载呀~
其实没必要这么夸张吧,盗版电子书一搜一大堆非要爬这个 = =
{"success":false,"code":"common_0001","mess":"对不起,系统异常了,请联系管理员!","module":null,"otherResult":null}
问题:限定类目为【AC02 计算机科学(11)】,固定下载3本书之后就停止了,是什么原因呢~求助
Traceback (most recent call last):
....
File "d:\Users\xxxx\GitWorks\2\CMPEDUDownload\download.py", line 51, in <module>
main()
File "d:\Users\xxxx\GitWorks\2\CMPEDUDownload\download.py", line 39, in main
catgories = json.load(fp)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python37\lib\json\__init__.py", line 293, in load
return loads(fp.read(),
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 20: illegal multibyte sequence
看起来是读取 json 编码错误引起的
推荐把
Line 38 in 0752ec0
改为
with open("categories.json", encoding='utf-8') as fp:
原来的下载地址用 aria2 直接报错了,再用 download.py 去获取就报错了.
刚才还有报错,现在直接没有任何显示,等等我再试试,看看把错误提示给补上
https://cmpebooks.s3.cn-north-1.amazonaws.com.cn/books/4/978-7-111-49107-1_1-2/PDF/978-7-111-49107-1_1-2_2.pdf
referer=https://cmpebooks.s3.cn-north-1.amazonaws.com.cn/pdfReader/generic/build/pdf.worker.js
out=downloads/ZC08-姹借溅鎶€鏈垱鏂颁笌鐮斿彂绯诲垪涓涗功/姹借溅杞﹁韩鍣0涓庢尟鍔ㄦ帶鍒?pdf
[DL:11MiB][#0c4902 30MiB/38MiB(80%)][#174d5d 15MiB/96MiB(16%)][#677513 24MiB/71MiB(34%)][#d2f74f 13MiB/53MiB(25%)][#ee
02/03 22:38:56 [NOTICE] Download complete: D:/aria2/downloads/AA08-����һ�廯/��ҵ������Ӧ�ü�������.pdf
已解决
运行出现:
File "Download.py", line 141, in
category = sys.argv[1]
IndexError: list index out of range
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.