Skip to content

Commit

Permalink
Protect from MemoryError occuring when parsing large documents
Browse files Browse the repository at this point in the history
  • Loading branch information
Arduous committed Aug 1, 2018
1 parent fa3ac17 commit 752a22e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions noisy.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ def crawl(self):

except requests.exceptions.RequestException:
logging.warn("Error connecting to root url: {}".format(url))

except MemoryError:
logging.warn("Error: content at url: {} is exhausting the memory".format(url))

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

0 comments on commit 752a22e

Please sign in to comment.