Compare commits

..

5 Commits

Author SHA1 Message Date
dgtlmoon
47803f95a3 "In stock" should be 'none' by default 2024-01-01 16:31:32 +01:00
dgtlmoon
3d1e1025d2 0.45.9 2023-12-20 15:30:58 +01:00
dgtlmoon
5528b7c4b3 Restock detection - Update stock-not-in-stock.js strings (Dutch translations) 2023-12-20 15:28:43 +01:00
Constantin Hong
0dce3f4fec Testing: Improve application signal handling test coverage (#2052) 2023-12-19 11:10:51 +01:00
dgtlmoon
af4311a68c Update docker-compose.yml 2023-12-09 14:56:00 +01:00
8 changed files with 17 additions and 18 deletions

View File

@@ -118,7 +118,8 @@ jobs:
sleep 3
# invert the check (it should be not 0/not running)
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`"
if [ $? -ne 0 ]
then
@@ -138,7 +139,7 @@ jobs:
sleep 3
# invert the check (it should be not 0/not running)
docker ps
docker logs sig-test
docker logs sig-test | grep 'Shutdown: Got Signal - SIGTERM' || exit 1
test -z "`docker ps|grep sig-test`"
if [ $? -ne 0 ]
then

View File

@@ -2,7 +2,7 @@
# Read more https://github.com/dgtlmoon/changedetection.io/wiki
__version__ = '0.45.8.1'
__version__ = '0.45.9'
from distutils.util import strtobool
from json.decoder import JSONDecodeError

View File

@@ -311,7 +311,6 @@ class base_html_playwright(Fetcher):
is_binary=False):
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
@@ -324,19 +323,13 @@ class base_html_playwright(Fetcher):
from requests.exceptions import ConnectTimeout, ReadTimeout
wait_browserless_seconds = 240
# Could be set from the browser-override
browserless_function_url = self.browser_connection_url
browserless_function_url = os.getenv('BROWSERLESS_FUNCTION_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
if self.proxy:

View File

@@ -38,6 +38,7 @@ base_config = {
'track_ldjson_price_data': None,
'headers': {}, # Extra headers to send
'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
'include_filters': [],
'last_checked': 0,

View File

@@ -28,6 +28,8 @@ function isItemInStock() {
'nicht auf lager',
'nicht lieferbar',
'nicht zur verfügung',
'niet leverbaar',
'niet beschikbaar',
'no disponible temporalmente',
'no longer in stock',
'no tickets available',
@@ -44,6 +46,7 @@ function isItemInStock() {
'temporarily out of stock',
'temporarily unavailable',
'tickets unavailable',
'tijdelijk uitverkocht',
'unavailable tickets',
'we do not currently have an estimate of when this product will be back in stock.',
'zur zeit nicht an lager',

View File

@@ -248,6 +248,7 @@ class ChangeDetectionStore:
'check_count': 0,
'fetch_time' : 0.0,
'has_ldjson_price_data': None,
'in_stock': None,
'last_checked': 0,
'last_error': False,
'last_notification_error': False,

View File

@@ -141,7 +141,7 @@
{% if watch['processor'] == 'restock_diff' %}
<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.. -->
{% if watch['last_checked'] %}
{% if watch['last_checked'] and watch['in_stock'] != None %}
{% if watch['in_stock'] %} In stock {% else %} Not in stock {% endif %}
{% else %}
Not yet checked

View File

@@ -90,7 +90,7 @@ services:
#
# 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:
# hostname: browser-chrome
# image: selenium/standalone-chrome:4