Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions modules/pagereader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ def read_first_page(site):
err = e

if type(err) == HTTPError:
print("There has been an HTTP error after three attempts.")
exit(1)
print ("There has been an HTTP error after three attempts.")
exit (1)
if type(err) == ConnectionError:
print("There has been a connection error after three attempts.")
exit(1)
print("Got ConnectionError after three attempts... ",
"Please check if the TOR service is running or not.")
exit (1)


def read_page(site):
Expand Down Expand Up @@ -87,10 +88,11 @@ def read_page(site):
err = e

if type(err) == HTTPError:
raise("There has been an HTTP error after three attempts.")
print("There has been an HTTP error after three attempts.")
exit (1)
if type(err) == ConnectionError:
raise("There has been a connection error after three attempts.")

print("There has been a connection error after three attempts.")
exit (1)

def get_ip():
"""Returns users tor ip address
Expand Down