limit "broken codes"
This commit is contained in:
parent
72a195a0e7
commit
75d88ae1b1
1 changed files with 5 additions and 4 deletions
1
main.py
1
main.py
|
|
@ -64,6 +64,7 @@ def spider_rec(page_links, current_href, base_parse, exclude):
|
|||
|
||||
spider_rec(page_links, href, base_parse, exclude)
|
||||
except HTTPError as e:
|
||||
if e.code == 400 or e.code in range(404, 500):
|
||||
if parse_result.hostname == base_parse.hostname:
|
||||
page_links[postfix] = e
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue