Specify UTF-8 encoding for xpath_element_js (#3650)

This commit is contained in:
Voczi
2025-11-23 19:55:26 +01:00
committed by GitHub
parent 3276a9347a
commit 1c2c22b8df

View File

@@ -439,7 +439,7 @@ class browsersteps_live_ui(steppable_browser_interface):
logger.warning("Attempted to get current state after cleanup") logger.warning("Attempted to get current state after cleanup")
return (None, None) return (None, None)
xpath_element_js = importlib.resources.files("changedetectionio.content_fetchers.res").joinpath('xpath_element_scraper.js').read_text() xpath_element_js = importlib.resources.files("changedetectionio.content_fetchers.res").joinpath('xpath_element_scraper.js').read_text(encoding="utf-8")
now = time.time() now = time.time()
await self.page.wait_for_timeout(1 * 1000) await self.page.wait_for_timeout(1 * 1000)