Improved error handling in scrape.py by converting exception to string before printing.

This commit is contained in:
Paul Gauthier 2024-07-23 11:38:33 +02:00 committed by Paul Gauthier (aider)
parent 66c24faaca
commit d164c85426

View file

@ -115,7 +115,7 @@ class Scraper:
browser = p.chromium.launch(ignore_https_errors=not self.verify_ssl) browser = p.chromium.launch(ignore_https_errors=not self.verify_ssl)
except Exception as e: except Exception as e:
self.playwright_available = False self.playwright_available = False
self.print_error(e) self.print_error(str(e))
return return
page = browser.new_page(ignore_https_errors=not self.verify_ssl) page = browser.new_page(ignore_https_errors=not self.verify_ssl)