mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 08:39:59 -05:00
handle exceptions in robots.txt fetching/parsing
This commit is contained in:
parent
f00571f7bd
commit
6a09f2095c
@ -46,7 +46,11 @@ class Site:
|
||||
self.scope_surt = new_scope_surt
|
||||
|
||||
def is_permitted_by_robots(self, url):
|
||||
return self.ignore_robots or self._robots_cache.allowed(url, "brozzler")
|
||||
try:
|
||||
return self.ignore_robots or self._robots_cache.allowed(url, "brozzler")
|
||||
except BaseException as e:
|
||||
self.logger.error("problem with robots.txt for {}: {}".format(url, e))
|
||||
return False
|
||||
|
||||
def is_in_scope(self, url):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user