limit "broken codes"

This commit is contained in:
bMorgan01 2022-09-25 12:09:04 -06:00
parent 72a195a0e7
commit 75d88ae1b1

View file

@ -64,10 +64,11 @@ def spider_rec(page_links, current_href, base_parse, exclude):
spider_rec(page_links, href, base_parse, exclude)
except HTTPError as e:
if parse_result.hostname == base_parse.hostname:
page_links[postfix] = e
else:
page_links[current_href] = e
if e.code == 400 or e.code in range(404, 500):
if parse_result.hostname == base_parse.hostname:
page_links[postfix] = e
else:
page_links[current_href] = e
return page_links