mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-09-06 21:45:59 +00:00
Fetcher fix
This commit is contained in:
@@ -441,8 +441,12 @@ class fetcher(Fetcher):
|
||||
|
||||
if self.status_code != 200 and not ignore_status_codes:
|
||||
screenshot = await capture_full_page(page=self.page, screenshot_format=self.screenshot_format, watch_uuid=watch_uuid, lock_viewport_elements=self.lock_viewport_elements)
|
||||
|
||||
raise Non200ErrorCodeReceived(url=url, status_code=self.status_code, screenshot=screenshot)
|
||||
try:
|
||||
page_html = await self.page.content()
|
||||
except Exception as e:
|
||||
logger.warning(f"Got non-200 status {self.status_code} but failed to fetch page content: {e}")
|
||||
page_html = None
|
||||
raise Non200ErrorCodeReceived(url=url, status_code=self.status_code, screenshot=screenshot, page_html=page_html)
|
||||
|
||||
content = await self.page.content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user