Bug fixes
This commit is contained in:
parent
25d4c4185f
commit
54e92867bc
1 changed files with 2 additions and 2 deletions
|
|
@ -88,7 +88,7 @@ class Display:
|
||||||
self.out(output)
|
self.out(output)
|
||||||
|
|
||||||
self.save_last_request()
|
self.save_last_request()
|
||||||
sys.exit(128)
|
sys.exit(1)
|
||||||
|
|
||||||
def unhandled_exception(self, _, o, tb):
|
def unhandled_exception(self, _, o, tb):
|
||||||
self.log("".join(traceback.format_tb(tb)))
|
self.log("".join(traceback.format_tb(tb)))
|
||||||
|
|
@ -523,7 +523,7 @@ class SafariBooks:
|
||||||
|
|
||||||
def get_html(self, url):
|
def get_html(self, url):
|
||||||
response = self.requests_provider(url)
|
response = self.requests_provider(url)
|
||||||
if response == 0:
|
if response == 0 or response.status_code != 200:
|
||||||
self.display.exit(
|
self.display.exit(
|
||||||
"Crawler: error trying to retrieve this page: %s (%s)\n From: %s" %
|
"Crawler: error trying to retrieve this page: %s (%s)\n From: %s" %
|
||||||
(self.filename, self.chapter_title, url)
|
(self.filename, self.chapter_title, url)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue