mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-11-21 08:56:09 +00:00
Compare commits
5 Commits
experiment
...
restock-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
47803f95a3 | ||
|
|
3d1e1025d2 | ||
|
|
5528b7c4b3 | ||
|
|
0dce3f4fec | ||
|
|
af4311a68c |
5
.github/workflows/test-only.yml
vendored
5
.github/workflows/test-only.yml
vendored
@@ -118,7 +118,8 @@ jobs:
|
|||||||
sleep 3
|
sleep 3
|
||||||
# invert the check (it should be not 0/not running)
|
# invert the check (it should be not 0/not running)
|
||||||
docker ps
|
docker ps
|
||||||
docker logs sig-test
|
# check signal catch(STDOUT) log
|
||||||
|
docker logs sig-test | grep 'Shutdown: Got Signal - SIGINT' || exit 1
|
||||||
test -z "`docker ps|grep sig-test`"
|
test -z "`docker ps|grep sig-test`"
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
@@ -138,7 +139,7 @@ jobs:
|
|||||||
sleep 3
|
sleep 3
|
||||||
# invert the check (it should be not 0/not running)
|
# invert the check (it should be not 0/not running)
|
||||||
docker ps
|
docker ps
|
||||||
docker logs sig-test
|
docker logs sig-test | grep 'Shutdown: Got Signal - SIGTERM' || exit 1
|
||||||
test -z "`docker ps|grep sig-test`"
|
test -z "`docker ps|grep sig-test`"
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Read more https://github.com/dgtlmoon/changedetection.io/wiki
|
# Read more https://github.com/dgtlmoon/changedetection.io/wiki
|
||||||
|
|
||||||
__version__ = '0.45.8.1'
|
__version__ = '0.45.9'
|
||||||
|
|
||||||
from distutils.util import strtobool
|
from distutils.util import strtobool
|
||||||
from json.decoder import JSONDecodeError
|
from json.decoder import JSONDecodeError
|
||||||
|
|||||||
@@ -311,7 +311,6 @@ class base_html_playwright(Fetcher):
|
|||||||
is_binary=False):
|
is_binary=False):
|
||||||
|
|
||||||
from pkg_resources import resource_string
|
from pkg_resources import resource_string
|
||||||
from urllib.parse import urlparse
|
|
||||||
|
|
||||||
extra_wait_ms = (int(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5)) + self.render_extract_delay) * 1000
|
extra_wait_ms = (int(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5)) + self.render_extract_delay) * 1000
|
||||||
|
|
||||||
@@ -324,19 +323,13 @@ class base_html_playwright(Fetcher):
|
|||||||
from requests.exceptions import ConnectTimeout, ReadTimeout
|
from requests.exceptions import ConnectTimeout, ReadTimeout
|
||||||
wait_browserless_seconds = 240
|
wait_browserless_seconds = 240
|
||||||
|
|
||||||
# Could be set from the browser-override
|
browserless_function_url = os.getenv('BROWSERLESS_FUNCTION_URL')
|
||||||
browserless_function_url = self.browser_connection_url
|
from urllib.parse import urlparse
|
||||||
|
if not browserless_function_url:
|
||||||
|
# Convert/try to guess from PLAYWRIGHT_DRIVER_URL
|
||||||
|
o = urlparse(os.getenv('PLAYWRIGHT_DRIVER_URL'))
|
||||||
|
browserless_function_url = o._replace(scheme="http")._replace(path="function").geturl()
|
||||||
|
|
||||||
# Or use the system config defaults
|
|
||||||
if not self.browser_connection_url:
|
|
||||||
browserless_function_url = os.getenv('BROWSERLESS_FUNCTION_URL')
|
|
||||||
|
|
||||||
if not self.browser_connection_url:
|
|
||||||
browserless_function_url = os.getenv('PLAYWRIGHT_DRIVER_URL')
|
|
||||||
|
|
||||||
# Convert always to http:// and function/ for browserless
|
|
||||||
o = urlparse(browserless_function_url)
|
|
||||||
browserless_function_url = o._replace(scheme="http")._replace(path="function").geturl()
|
|
||||||
|
|
||||||
# Append proxy connect string
|
# Append proxy connect string
|
||||||
if self.proxy:
|
if self.proxy:
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ base_config = {
|
|||||||
'track_ldjson_price_data': None,
|
'track_ldjson_price_data': None,
|
||||||
'headers': {}, # Extra headers to send
|
'headers': {}, # Extra headers to send
|
||||||
'ignore_text': [], # List of text to ignore when calculating the comparison checksum
|
'ignore_text': [], # List of text to ignore when calculating the comparison checksum
|
||||||
|
'in_stock' : None,
|
||||||
'in_stock_only' : True, # Only trigger change on going to instock from out-of-stock
|
'in_stock_only' : True, # Only trigger change on going to instock from out-of-stock
|
||||||
'include_filters': [],
|
'include_filters': [],
|
||||||
'last_checked': 0,
|
'last_checked': 0,
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ function isItemInStock() {
|
|||||||
'nicht auf lager',
|
'nicht auf lager',
|
||||||
'nicht lieferbar',
|
'nicht lieferbar',
|
||||||
'nicht zur verfügung',
|
'nicht zur verfügung',
|
||||||
|
'niet leverbaar',
|
||||||
|
'niet beschikbaar',
|
||||||
'no disponible temporalmente',
|
'no disponible temporalmente',
|
||||||
'no longer in stock',
|
'no longer in stock',
|
||||||
'no tickets available',
|
'no tickets available',
|
||||||
@@ -44,6 +46,7 @@ function isItemInStock() {
|
|||||||
'temporarily out of stock',
|
'temporarily out of stock',
|
||||||
'temporarily unavailable',
|
'temporarily unavailable',
|
||||||
'tickets unavailable',
|
'tickets unavailable',
|
||||||
|
'tijdelijk uitverkocht',
|
||||||
'unavailable tickets',
|
'unavailable tickets',
|
||||||
'we do not currently have an estimate of when this product will be back in stock.',
|
'we do not currently have an estimate of when this product will be back in stock.',
|
||||||
'zur zeit nicht an lager',
|
'zur zeit nicht an lager',
|
||||||
|
|||||||
@@ -248,6 +248,7 @@ class ChangeDetectionStore:
|
|||||||
'check_count': 0,
|
'check_count': 0,
|
||||||
'fetch_time' : 0.0,
|
'fetch_time' : 0.0,
|
||||||
'has_ldjson_price_data': None,
|
'has_ldjson_price_data': None,
|
||||||
|
'in_stock': None,
|
||||||
'last_checked': 0,
|
'last_checked': 0,
|
||||||
'last_error': False,
|
'last_error': False,
|
||||||
'last_notification_error': False,
|
'last_notification_error': False,
|
||||||
|
|||||||
@@ -141,7 +141,7 @@
|
|||||||
{% if watch['processor'] == 'restock_diff' %}
|
{% if watch['processor'] == 'restock_diff' %}
|
||||||
<span class="restock-label {{'in-stock' if watch['in_stock'] else 'not-in-stock' }}" title="detecting restock conditions">
|
<span class="restock-label {{'in-stock' if watch['in_stock'] else 'not-in-stock' }}" title="detecting restock conditions">
|
||||||
<!-- maybe some object watch['processor'][restock_diff] or.. -->
|
<!-- maybe some object watch['processor'][restock_diff] or.. -->
|
||||||
{% if watch['last_checked'] %}
|
{% if watch['last_checked'] and watch['in_stock'] != None %}
|
||||||
{% if watch['in_stock'] %} In stock {% else %} Not in stock {% endif %}
|
{% if watch['in_stock'] %} In stock {% else %} Not in stock {% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
Not yet checked
|
Not yet checked
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ services:
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Used for fetching pages via Playwright+Chrome where you need Javascript support.
|
# Used for fetching pages via Playwright+Chrome where you need Javascript support.
|
||||||
# Note: works well but is deprecated, doesnt fetch full page screenshots and other issues
|
# Note: works well but is deprecated, does not fetch full page screenshots (doesnt work with Visual Selector) and other issues
|
||||||
# browser-chrome:
|
# browser-chrome:
|
||||||
# hostname: browser-chrome
|
# hostname: browser-chrome
|
||||||
# image: selenium/standalone-chrome:4
|
# image: selenium/standalone-chrome:4
|
||||||
|
|||||||
Reference in New Issue
Block a user