Merge pull request #25 from linuxserver/browser-steps

Workaround for UTF encoding with browser steps
This commit is contained in:
Adam 2024-10-14 18:11:36 +01:00 committed by GitHub
commit 78bec599a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,8 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
# Force UTF-8 encoding for browser steps to prevent exception
sed -i "s|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')|" /app/changedetection/changedetectionio/blueprint/browser_steps/browser_steps.py
lsiown -R abc:abc \
/config \