Git Product home page Git Product logo

it-ebooks-dl's People

Contributors

xtream1101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

it-ebooks-dl's Issues

Getting Syntax Error

~/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

How to deal with IncompleteRead problem?

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.

Debian and Raspian

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.