From 3e5671a3a2fc6facea975356079462acb89ab9b3 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 29 Oct 2023 11:43:27 +0100 Subject: [PATCH 1/3] Selenium fetcher - Test was on `4.14.1` but documentation was not, change both to `4` (#1912) --- .github/workflows/test-only.yml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-only.yml b/.github/workflows/test-only.yml index 0b0bb5a7..08a3f944 100644 --- a/.github/workflows/test-only.yml +++ b/.github/workflows/test-only.yml @@ -29,7 +29,7 @@ jobs: docker network create changedet-network # Selenium+browserless - docker run --network changedet-network -d --hostname selenium -p 4444:4444 --rm --shm-size="2g" selenium/standalone-chrome:4.14.1 + docker run --network changedet-network -d --hostname selenium -p 4444:4444 --rm --shm-size="2g" selenium/standalone-chrome:4 docker run --network changedet-network -d --hostname browserless -e "FUNCTION_BUILT_INS=[\"fs\",\"crypto\"]" -e "DEFAULT_LAUNCH_ARGS=[\"--window-size=1920,1080\"]" --rm -p 3000:3000 --shm-size="2g" browserless/chrome:1.60-chrome-stable - name: Build changedetection.io container for testing diff --git a/docker-compose.yml b/docker-compose.yml index 50d084f5..a6b927de 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,7 @@ services: # browser-chrome: # hostname: browser-chrome -# image: selenium/standalone-chrome-debug:3.141.59 +# image: selenium/standalone-chrome:4 # environment: # - VNC_NO_PASSWORD=1 # - SCREEN_WIDTH=1920 From 9ffe7e0eaf19e608caf3157b74637225391d4566 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sun, 29 Oct 2023 19:13:15 +0100 Subject: [PATCH 2/3] Nice format stats (comma sep) --- changedetectionio/templates/edit.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index 54733d85..270cdbce 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -455,15 +455,15 @@ Unavailable") }} Check count - {{ watch.check_count }} + {{ "{:,}".format( watch.check_count) }} Consecutive filter failures - {{ watch.consecutive_filter_failures }} + {{ "{:,}".format( watch.consecutive_filter_failures) }} History length - {{ watch.history|length }} + {{ "{:,}".format(watch.history|length) }} Last fetch time From a0665e1f1890c55139183221ae703fc76159256d Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 30 Oct 2023 16:08:31 +0100 Subject: [PATCH 3/3] Fetcher - experimental puppeteer fetch - dont rewrite the proxy protocol (fixes socks5 bug) --- changedetectionio/content_fetcher.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/changedetectionio/content_fetcher.py b/changedetectionio/content_fetcher.py index 2243567f..c17419af 100644 --- a/changedetectionio/content_fetcher.py +++ b/changedetectionio/content_fetcher.py @@ -333,9 +333,8 @@ class base_html_playwright(Fetcher): # Remove username/password if it exists in the URL or you will receive "ERR_NO_SUPPORTED_PROXIES" error # Actual authentication handled by Puppeteer/node o = urlparse(self.proxy.get('server')) - # Remove scheme, socks5:// doesnt always work and it will autodetect anyway - proxy_url = urllib.parse.quote(o._replace(netloc="{}:{}".format(o.hostname, o.port)).geturl().replace(f"{o.scheme}://", '', 1)) - browserless_function_url = f"{browserless_function_url}&--proxy-server={proxy_url}&dumpio=true" + proxy_url = urllib.parse.quote(o._replace(netloc="{}:{}".format(o.hostname, o.port)).geturl()) + browserless_function_url = f"{browserless_function_url}&--proxy-server={proxy_url}" try: amp = '&' if '?' in browserless_function_url else '?'