mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-05 05:04:46 +00:00
Check content and recursion in one try/except to avoid multiple errors when getting page content.
This commit is contained in:
parent
60f7af4598
commit
c3b8ff00b3
1 changed files with 2 additions and 2 deletions
|
|
@ -442,7 +442,6 @@ class UrlBase (object):
|
|||
self.check_connection()
|
||||
self.add_size_info()
|
||||
self.add_country_info()
|
||||
self.check_content()
|
||||
except tuple(ExcList):
|
||||
value = self.handle_exception()
|
||||
# make nicer error msg for unknown hosts
|
||||
|
|
@ -453,8 +452,9 @@ class UrlBase (object):
|
|||
value = _('Bad HTTP response %(line)r') % {"line": str(value)}
|
||||
self.set_result(unicode_safe(value), valid=False)
|
||||
self.checktime = time.time() - check_start
|
||||
# check recursion
|
||||
# check content and recursion
|
||||
try:
|
||||
self.check_content()
|
||||
if self.allows_recursion():
|
||||
self.parse_url()
|
||||
# check content size
|
||||
|
|
|
|||
Loading…
Reference in a new issue