Skip to content

Commit

Permalink
Merge pull request 1tayH#12 from Arduous/969070ca
Browse files Browse the repository at this point in the history
catch requests parsing error
  • Loading branch information
1tayH authored Jul 22, 2018
2 parents 969070c + ed093ec commit 871f896
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions noisy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import time

import requests
from urllib3.exceptions import LocationParseError

try: # Python 2
from urllib.parse import urljoin, urlparse
Expand Down Expand Up @@ -239,6 +240,9 @@ def crawl(self):
except requests.exceptions.RequestException:
logging.warn("Error connecting to root url: {}".format(url))

except LocationParseError:
logging.warn("Error encountered during parsing of: {}".format(url))

except self.CrawlerTimedOut:
logging.info("Timeout has exceeded, exiting")
return
Expand Down

0 comments on commit 871f896

Please sign in to comment.