From 730f37c7ba2c8d2ec5dbfa56315a37b106f73981 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 19 Aug 2024 09:17:18 +0200 Subject: [PATCH] Set encoding type for scraper script reader (#2574 #2568) --- changedetectionio/content_fetchers/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changedetectionio/content_fetchers/base.py b/changedetectionio/content_fetchers/base.py index 66dd7403..c764f77e 100644 --- a/changedetectionio/content_fetchers/base.py +++ b/changedetectionio/content_fetchers/base.py @@ -65,8 +65,8 @@ class Fetcher(): def __init__(self): import importlib.resources - self.xpath_element_js = importlib.resources.files("changedetectionio.content_fetchers.res").joinpath('xpath_element_scraper.js').read_text() - self.instock_data_js = importlib.resources.files("changedetectionio.content_fetchers.res").joinpath('stock-not-in-stock.js').read_text() + self.xpath_element_js = importlib.resources.files("changedetectionio.content_fetchers.res").joinpath('xpath_element_scraper.js').read_text(encoding='utf-8') + self.instock_data_js = importlib.resources.files("changedetectionio.content_fetchers.res").joinpath('stock-not-in-stock.js').read_text(encoding='utf-8') @abstractmethod def get_error(self):