|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
from loguru import logger
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Non200ErrorCodeReceived(Exception):
|
|
|
|
|
def __init__(self, status_code, url, screenshot=None, xpath_data=None, page_html=None):
|
|
|
|
|
# Set this so we can use it in other parts of the app
|
|
|
|
@ -81,7 +80,7 @@ class ScreenshotUnavailable(Exception):
|
|
|
|
|
self.status_code = status_code
|
|
|
|
|
self.url = url
|
|
|
|
|
if page_html:
|
|
|
|
|
from html_tools import html_to_text
|
|
|
|
|
from changedetectionio.html_tools import html_to_text
|
|
|
|
|
self.page_text = html_to_text(page_html)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|