Skip to content

Commit

Permalink
Don't get current_url on unrecoverable exceptions
Browse files Browse the repository at this point in the history
Following up on 5211f67
  • Loading branch information
ghostwords committed Jan 6, 2025
1 parent 44232c0 commit d0b42a1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,7 @@ def crawl(self):
num_visited += 1

except (MaxRetryError, ProtocolError, ReadTimeoutError) as ex:
self.logger.warning("Error loading %s:\n%s",
self.get_current_url() or domain,
str(ex))
self.logger.warning("Error loading %s:\n%s", domain, str(ex))
self.restart_browser()

except TimeoutException:
Expand Down

0 comments on commit d0b42a1

Please sign in to comment.