mirror of
https://github.com/netzbegruenung/green-spider.git
synced 2024-05-02 00:54:52 +02:00
Mofivy url_reachabliity to remove URLs if status 404
This commit is contained in:
parent
cf9136b481
commit
2cebb3ff28
|
@ -60,6 +60,10 @@ class Checker(AbstractChecker):
|
|||
# remove source URL, add target URL to config.urls
|
||||
self.config.remove_url(url)
|
||||
self.config.add_url(r.url)
|
||||
|
||||
# remove 404 etc
|
||||
if r.status_code > 400:
|
||||
self.config.remove_url(url)
|
||||
|
||||
except Exception as exc:
|
||||
logging.info("Exception for URL %s: %s %s", url, str(type(exc)), exc)
|
||||
|
|
Loading…
Reference in a new issue