xtream1101 / it-ebooks-dl Goto Github PK
View Code? Open in Web Editor NEWDepreciated, use project scrape-itebooks
Depreciated, use project scrape-itebooks
When I try to run the script on my VPS or Rasberry Pi I get the following error.
Traceback (most recent call last):
File "/usr/lib/python3.2/threading.py", line 740, in _bootstrap_inner
self.run()
File "/usr/lib/python3.2/threading.py", line 693, in run
self._target(_self._args, *_self._kwargs)
File "it-ebooks-dl.py", line 84, in _parse_start
self._parse_worker(num)
File "it-ebooks-dl.py", line 110, in _parse_worker
parser.feed(html)
File "/usr/lib/python3.2/html/parser.py", line 142, in feed
self.goahead(0)
File "/usr/lib/python3.2/html/parser.py", line 186, in goahead
k = self.parse_starttag(i)
File "/usr/lib/python3.2/html/parser.py", line 319, in parse_starttag
endpos = self.check_for_whole_start_tag(i)
File "/usr/lib/python3.2/html/parser.py", line 409, in check_for_whole_start_tag
self.error("malformed start tag")
File "/usr/lib/python3.2/html/parser.py", line 149, in error
raise HTMLParseError(message, self.getpos())
html.parser.HTMLParseError: malformed start tag, at line 133, column 63
~/ebooks-dl $ python it-ebooks-dl.py
File "it-ebooks-dl.py", line 83
print("Parsed: "+str(num)+" books\tElapsed Time: " + elapsed_time(), end='\r')
^
SyntaxError: invalid syntax
Exception in thread Thread-34:0:36:47
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "it-ebooks-dl.py", line 150, in _dl_start
self._dl_worker(self._saved_list[num])
File "it-ebooks-dl.py", line 188, in _dl_worker
data = response.read()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 512, in read
s = self._safe_read(self.length)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 664, in _safe_read
raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(79077 bytes read, 27929599 more expected)
Exception in thread Thread-31:d Time: 2:37:13
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "it-ebooks-dl.py", line 150, in _dl_start
self._dl_worker(self._saved_list[num])
File "it-ebooks-dl.py", line 188, in _dl_worker
data = response.read()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 512, in read
s = self._safe_read(self.length)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 664, in _safe_read
raise IncompleteRead(b''.join(s), amt)
http.client.IncompleteRead: IncompleteRead(19357756 bytes read, 5579686 more expected)
Normally the program continue downloading when encourter this problem but sometime it does not continue and has to start over again from book number 1.
Using single thread for downloading seems solve the issue, unstable internet connection might be the source of issue. Finally get the work done, thank you.
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.