Skip to content

Commit

Permalink
Improve for gh-5
Browse files Browse the repository at this point in the history
Signed-off-by: MikeMeliz <[email protected]>
  • Loading branch information
MikeMeliz committed Jul 26, 2019
1 parent 244d0aa commit e4b8f45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions modules/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ def outex(website, outputFile, outpath):
def termex(website):
try:
print urllib2.urlopen(website).read()
except:
e = sys.exc_info()[0]
print("Error: %s" % e + "\n## Not valid URL \n## Did you forget \'http://\'?")
except (urllib2.HTTPError, urllib2.URLError) as e:
print("Error: (%s) %s" % (e, website))
return None


def extractor(website, crawl, outputFile, inputFile, outpath):
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
beautifulsoup4==4.4.1
beautifulsoup4==4.7.1
requests==2.21.0
urllib3>=1.24.2

0 comments on commit e4b8f45

Please sign in to comment.