Skip to content

Commit

Permalink
Changed Error Message (hardikvasa#168)
Browse files Browse the repository at this point in the history
Improving the error reporting if raw page could not be downloaded.
  • Loading branch information
hellogan authored and hardikvasa committed Nov 4, 2018
1 parent 26a3240 commit 10a782c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion google_images_download/google_images_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def download_page(self,url):
respData = str(resp.read())
return respData
except Exception as e:
print(str(e))
print("Could not open URL. Please check your internet connection and/or ssl settings")
else: # If the Current Version of Python is 2.x
try:
headers = {}
Expand All @@ -150,6 +150,7 @@ def download_page(self,url):
page = response.read()
return page
except:
print("Could not open URL. Please check your internet connection and/or ssl settings")
return "Page Not found"


Expand Down

0 comments on commit 10a782c

Please sign in to comment.