repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_trigger_regex.py | changedetectionio/tests/test_trigger_regex.py | #!/usr/bin/env python3
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
import os
def set_original_ignore_response(datastore_path):
test_return_data = """<html>
<body>
Some initial text<br>
<p>Which is across multiple lines</p>
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/conftest.py | changedetectionio/tests/conftest.py | #!/usr/bin/env python3
import psutil
import time
from threading import Thread
import pytest
import arrow
from changedetectionio import changedetection_app
from changedetectionio import store
import os
import sys
from loguru import logger
from changedetectionio.flask_app import init_app_secret
from changedetectionio.t... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_notification.py | changedetectionio/tests/test_notification.py | import json
import os
import time
import re
from flask import url_for
from loguru import logger
from .util import set_original_response, set_modified_response, set_more_modified_response, live_server_setup, wait_for_all_checks
from . util import extract_UUID_from_client
import logging
import base64
from changedetect... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_live_preview.py | changedetectionio/tests/test_live_preview.py | #!/usr/bin/env python3
from flask import url_for
from changedetectionio.tests.util import live_server_setup, wait_for_all_checks, extract_UUID_from_client, delete_all_watches
import os
def set_response(datastore_path):
data = """<html>
<body>Awesome, you made it<br>
yeah the socks request worked<br>
some... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_api_openapi.py | changedetectionio/tests/test_api_openapi.py | #!/usr/bin/env python3
"""
OpenAPI validation tests for ChangeDetection.io API
This test file specifically verifies that OpenAPI validation is working correctly
by testing various scenarios that should trigger validation errors.
"""
import time
import json
from flask import url_for
from .util import live_server_setup... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_notification_errors.py | changedetectionio/tests/test_notification_errors.py | import os
import time
from flask import url_for
from .util import set_original_response, set_modified_response, live_server_setup, wait_for_all_checks
import logging
def test_check_notification_error_handling(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup on c... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_conditions.py | changedetectionio/tests/test_conditions.py | #!/usr/bin/env python3
import json
import time
import os
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
from ..model import CONDITIONS_MATCH_LOGIC_DEFAULT
def set_original_response(datastore_path, number="50"):
test_return_data = f"""<html>
<body>
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_history_consistency.py | changedetectionio/tests/test_history_consistency.py | #!/usr/bin/env python3
import time
import os
import json
from flask import url_for
from .util import wait_for_all_checks, delete_all_watches
from urllib.parse import urlparse, parse_qs
def test_consistent_history(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup ... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_api.py | changedetectionio/tests/test_api.py | #!/usr/bin/env python3
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
import os
import json
import uuid
def set_original_response(datastore_path):
test_return_data = """<html>
<body>
Some initial text<br>
<p>Which is across mul... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_restock_itemprop.py | changedetectionio/tests/test_restock_itemprop.py | #!/usr/bin/env python3
import os
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, wait_for_notification_endpoint_output, extract_UUID_from_client, delete_all_watches
from ..notification import default_notification_format
instock_props = [
# LD+JSON with non-standard ... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_errorhandling.py | changedetectionio/tests/test_errorhandling.py | #!/usr/bin/env python3
import time
import os
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
def _runner_test_http_errors(client, live_server, http_code, expected_text, datastore_path):
with open(os.path.join(datastore_path, "endpoint-content.txt"), "w")... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_group.py | changedetectionio/tests/test_group.py | #!/usr/bin/env python3
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, extract_rss_token_from_UI, get_UUID_for_tag_name, extract_UUID_from_client, delete_all_watches
import os
# def test_setup(client, live_server, measure_memory_usage, datastore_path):
# live_serve... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_block_while_text_present.py | changedetectionio/tests/test_block_while_text_present.py | #!/usr/bin/env python3
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
from changedetectionio import html_tools
import os
def set_original_ignore_response(datastore_path):
test_return_data = """<html>
<body>
Some initial text<br>
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_filter_failure_notification.py | changedetectionio/tests/test_filter_failure_notification.py | import os
import time
from flask import url_for
from .util import set_original_response, wait_for_all_checks, wait_for_notification_endpoint_output
from ..notification import valid_notification_formats
def set_response_with_filter(datastore_path):
test_return_data = """<html>
<body>
Some initial text... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_watch_fields_storage.py | changedetectionio/tests/test_watch_fields_storage.py | import time
from flask import url_for
from urllib.request import urlopen
from . util import set_original_response, set_modified_response, live_server_setup
def test_check_watch_field_storage(client, live_server, measure_memory_usage, datastore_path):
set_original_response(datastore_path=datastore_path)
# liv... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/__init__.py | changedetectionio/tests/__init__.py | """Tests for the app."""
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_extract_regex.py | changedetectionio/tests/test_extract_regex.py | #!/usr/bin/env python3
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
import os
from ..html_tools import *
def set_original_response(datastore_path):
test_return_data = """<html>
<body>
Some initial text<br>
<p>Which is across ... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_ignore_regex_text.py | changedetectionio/tests/test_ignore_regex_text.py | #!/usr/bin/env python3
from . util import live_server_setup
from changedetectionio import html_tools
# Unit test of the stripper
# Always we are dealing in utf-8
def test_strip_regex_text_func():
test_content = """
but sometimes we want to remove the lines.
but 1 lines
skip 5 lines
really? ... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_datastore_isolation.py | changedetectionio/tests/test_datastore_isolation.py | #!/usr/bin/env python3
"""Test to verify client and live_server share the same datastore"""
def test_client_and_live_server_share_datastore(client, live_server):
"""Verify that client and live_server use the same app and datastore."""
# They should be the SAME object
assert client.application is live_serv... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_search.py | changedetectionio/tests/test_search.py | from flask import url_for
from .util import set_original_response, set_modified_response, live_server_setup
import time
def test_basic_search(client, live_server, measure_memory_usage, datastore_path):
urls = ['https://localhost:12300?first-result=1',
'https://localhost:5000?second-result=1'
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_rss.py | changedetectionio/tests/test_rss.py | #!/usr/bin/env python3
import os
import time
from flask import url_for
from .util import set_original_response, set_modified_response, live_server_setup, wait_for_all_checks, extract_rss_token_from_UI, \
extract_UUID_from_client, delete_all_watches
from loguru import logger
from ..blueprint.rss import RSS_FORMAT_TY... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_api_search.py | changedetectionio/tests/test_api_search.py | from copy import copy
from flask import url_for
import json
import time
from .util import live_server_setup, wait_for_all_checks
def test_api_search(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup on conftest per function
api_key = live_server.app.config['... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_security.py | changedetectionio/tests/test_security.py | import os
from flask import url_for
from changedetectionio.tests.util import set_modified_response
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
from .. import strtobool
def set_original_response(datastore_path):
test_return_data = """<html>
<head><title>head title</title></he... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_import.py | changedetectionio/tests/test_import.py | #!/usr/bin/env python3
import io
import os
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
# def test_setup(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup on conftest per function
def test_i... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_rss_group.py | changedetectionio/tests/test_rss_group.py | #!/usr/bin/env python3
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, extract_rss_token_from_UI, get_UUID_for_tag_name, delete_all_watches
import os
def set_original_response(datastore_path):
test_return_data = """<html>
<body>
Some initial text<br>
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_rss_single_watch.py | changedetectionio/tests/test_rss_single_watch.py | #!/usr/bin/env python3
import time
import os
import xml.etree.ElementTree as ET
from flask import url_for
from .restock.test_restock import set_original_response
from .util import live_server_setup, wait_for_all_checks, extract_rss_token_from_UI, extract_UUID_from_client, delete_all_watches, set_modified_response
fro... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_encoding.py | changedetectionio/tests/test_encoding.py | #!/usr/bin/env python3
# coding=utf-8
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, extract_UUID_from_client
import pytest
import os
def set_html_response(datastore_path):
test_return_data = """
<html><body><span class="nav_second_img_text">
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_api_notifications.py | changedetectionio/tests/test_api_notifications.py | #!/usr/bin/env python3
from flask import url_for
from .util import live_server_setup
import json
def test_api_notifications_crud(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup on conftest per function
api_key = live_server.app.config['DATASTORE'].data['set... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_scheduler.py | changedetectionio/tests/test_scheduler.py | #!/usr/bin/env python3
import time
from copy import copy
from datetime import datetime, timezone
from zoneinfo import ZoneInfo
from flask import url_for
from .util import live_server_setup, wait_for_all_checks, extract_UUID_from_client, delete_all_watches
from ..forms import REQUIRE_ATLEAST_ONE_TIME_PART_MESSAGE_DEFA... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_ignorewhitespace.py | changedetectionio/tests/test_ignorewhitespace.py | #!/usr/bin/env python3
import time
from flask import url_for
from . util import live_server_setup
import os
# Should be the same as set_original_ignore_response(datastore_path=datastore_path) but with a little more whitespacing
def set_original_ignore_response_but_with_whitespace(datastore_path):
test_return_d... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_trigger.py | changedetectionio/tests/test_trigger.py | #!/usr/bin/env python3
import time
from flask import url_for
from .util import live_server_setup, wait_for_all_checks
import os
def set_original_ignore_response(datastore_path):
test_return_data = """<html>
<body>
Some initial text<br>
<p>Which is across multiple lines</p>
<br>
So let'... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/test_element_removal.py | changedetectionio/tests/test_element_removal.py | #!/usr/bin/env python3
import time
import os
from flask import url_for
from ..html_tools import *
from .util import live_server_setup, wait_for_all_checks, delete_all_watches
def set_response_with_multiple_index(datastore_path):
data= """<!DOCTYPE html>
<html>
<body>
<!-- NOTE!! CHROME WILL ADD TBODY HERE I... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_socks5/test_socks5_proxy_sources.py | changedetectionio/tests/proxy_socks5/test_socks5_proxy_sources.py | #!/usr/bin/env python3
import os
from flask import url_for
from changedetectionio.tests.util import live_server_setup, wait_for_all_checks
def set_response(datastore_path):
import time
data = """<html>
<body>
<h1>Awesome, you made it</h1>
yeah the socks request worked
</body>
</html... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_socks5/test_socks5_proxy.py | changedetectionio/tests/proxy_socks5/test_socks5_proxy.py | #!/usr/bin/env python3
import json
import os
from flask import url_for
from changedetectionio.tests.util import live_server_setup, wait_for_all_checks, extract_UUID_from_client, delete_all_watches
def set_response(datastore_path):
import time
data = """<html>
<body>
<h1>Awesome, you made it</h1>
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/visualselector/test_fetch_data.py | changedetectionio/tests/visualselector/test_fetch_data.py | #!/usr/bin/env python3
import os
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks
# def test_setup(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup on conftest per function
# Add a site in paused mode, add an invalid filter, ... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/visualselector/conftest.py | changedetectionio/tests/visualselector/conftest.py | #!/usr/bin/env python3
from .. import conftest
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/visualselector/__init__.py | changedetectionio/tests/visualselector/__init__.py | """Tests for the app."""
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/apprise/test_apprise_asset.py | changedetectionio/tests/apprise/test_apprise_asset.py | import pytest
from apprise import AppriseAsset
from changedetectionio.apprise_asset import (
APPRISE_APP_DESC,
APPRISE_APP_ID,
APPRISE_APP_URL,
APPRISE_AVATAR_URL,
)
@pytest.fixture(scope="function")
def apprise_asset() -> AppriseAsset:
from changedetectionio.apprise_asset import apprise_asset
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/apprise/test_apprise_custom_api_call.py | changedetectionio/tests/apprise/test_apprise_custom_api_call.py | import json
from unittest.mock import patch
import pytest
import requests
from apprise.utils.parse import parse_url as apprise_parse_url
from ...apprise_plugin.custom_handlers import (
_get_auth,
_get_headers,
_get_params,
apprise_http_custom_handler,
SUPPORTED_HTTP_METHODS,
)
@pytest.mark.param... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/custom_browser_url/test_custom_browser_url.py | changedetectionio/tests/custom_browser_url/test_custom_browser_url.py | #!/usr/bin/env python3
import os
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks
def do_test(client, live_server, make_test_use_extra_browser=False):
# Grep for this string in the logs?
test_url = "https://changedetection.io/ci-test.html?non-custom-default=true"
# "non... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/custom_browser_url/__init__.py | changedetectionio/tests/custom_browser_url/__init__.py | # placeholder | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_list/test_select_custom_proxy.py | changedetectionio/tests/proxy_list/test_select_custom_proxy.py | #!/usr/bin/env python3
import time
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks
import os
# just make a request, we will grep in the docker logs to see it actually got called
def test_select_custom(client, live_server, measure_memory_usage, datastore_path):
# live_server_set... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_list/test_proxy.py | changedetectionio/tests/proxy_list/test_proxy.py | #!/usr/bin/env python3
import time
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks, extract_UUID_from_client
# just make a request, we will grep in the docker logs to see it actually got called
def test_check_basic_change_detection_functionality(client, live_server, measure_memory_... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_list/test_noproxy.py | changedetectionio/tests/proxy_list/test_noproxy.py | #!/usr/bin/env python3
import time
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks, extract_UUID_from_client
def test_noproxy_option(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup on conftest per function
# Run by run_p... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_list/test_multiple_proxy.py | changedetectionio/tests/proxy_list/test_multiple_proxy.py | #!/usr/bin/env python3
import os
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks
def test_preferred_proxy(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup on conftest per function
url = "http://chosen.changedetection.io"
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_list/conftest.py | changedetectionio/tests/proxy_list/conftest.py | #!/usr/bin/env python3
from .. import conftest
#def pytest_addoption(parser):
# parser.addoption("--url_suffix", action="store", default="identifier for request")
#def pytest_generate_tests(metafunc):
# # This is called for every test. Only get/set command line arguments
# # if the argument is specified in... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_list/__init__.py | changedetectionio/tests/proxy_list/__init__.py | """Tests for the app."""
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/proxy_list/test_proxy_noconnect.py | changedetectionio/tests/proxy_list/test_proxy_noconnect.py | #!/usr/bin/env python3
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks
import os
from ... import strtobool
# Just to be sure the UI outputs the right error message on proxy connection failed
# docker run -p 4444:4444 --rm --shm-size="2g" selenium/standalone-chrome:4
# PLAYWRIGHT_... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/restock/test_restock.py | changedetectionio/tests/restock/test_restock.py | #!/usr/bin/env python3
import os
import time
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks, extract_UUID_from_client, wait_for_notification_endpoint_output
from changedetectionio.notification import (
default_notification_body,
default_notification_format,
default_notif... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/restock/conftest.py | changedetectionio/tests/restock/conftest.py | #!/usr/bin/env python3
from .. import conftest
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/restock/__init__.py | changedetectionio/tests/restock/__init__.py | """Tests for the app."""
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_time_handler.py | changedetectionio/tests/unit/test_time_handler.py | #!/usr/bin/env python3
"""
Comprehensive tests for time_handler module refactored to use arrow.
Run from project root:
python3 -m pytest changedetectionio/tests/unit/test_time_handler.py -v
"""
import unittest
import arrow
from changedetectionio import time_handler
class TestAmIInsideTime(unittest.TestCase):
"... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_time_extension.py | changedetectionio/tests/unit/test_time_extension.py | #!/usr/bin/env python3
"""
Simple unit tests for TimeExtension that mimic how safe_jinja.py uses it.
These tests demonstrate that the environment.default_timezone override works
exactly as intended in the actual application code.
"""
import arrow
from jinja2.sandbox import ImmutableSandboxedEnvironment
from changedete... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_restock_logic.py | changedetectionio/tests/unit/test_restock_logic.py | #!/usr/bin/env python3
# run from dir above changedetectionio/ dir
# python3 -m unittest changedetectionio.tests.unit.test_restock_logic
import unittest
import os
import changedetectionio.processors.restock_diff.processor as restock_diff
# mostly
class TestDiffBuilder(unittest.TestCase):
def test_logic(self):
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_conditions.py | changedetectionio/tests/unit/test_conditions.py | from changedetectionio.conditions import execute_ruleset_against_all_plugins
from changedetectionio.model import CONDITIONS_MATCH_LOGIC_DEFAULT
from changedetectionio.store import ChangeDetectionStore
import shutil
import tempfile
import time
import unittest
import uuid
class TestTriggerConditions(unittest.TestCase):... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_watch_model.py | changedetectionio/tests/unit/test_watch_model.py | #!/usr/bin/env python3
# run from dir above changedetectionio/ dir
# python3 -m unittest changedetectionio.tests.unit.test_notification_diff
import unittest
import os
from changedetectionio.model import Watch
# mostly
class TestDiffBuilder(unittest.TestCase):
def test_watch_get_suggested_from_diff_timestamp(se... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/__init__.py | changedetectionio/tests/unit/__init__.py | """Unit tests for the app."""
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_semver.py | changedetectionio/tests/unit/test_semver.py | #!/usr/bin/env python3
# run from dir above changedetectionio/ dir
# python3 -m unittest changedetectionio.tests.unit.test_semver
import re
import unittest
# The SEMVER regex
SEMVER_REGEX = r"^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_jinja2_security.py | changedetectionio/tests/unit/test_jinja2_security.py | #!/usr/bin/env python3
# run from dir above changedetectionio/ dir
# python3 -m unittest changedetectionio.tests.unit.test_jinja2_security
import unittest
from changedetectionio import jinja2_custom as safe_jinja
# mostly
class TestJinja2SSTI(unittest.TestCase):
def test_exception(self):
import jinja2
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_notification_diff.py | changedetectionio/tests/unit/test_notification_diff.py | #!/usr/bin/env python3
# run from dir above changedetectionio/ dir
# python3 -m unittest changedetectionio.tests.unit.test_notification_diff
import unittest
import os
from changedetectionio import diff
from changedetectionio.diff import (
REMOVED_PLACEMARKER_OPEN,
REMOVED_PLACEMARKER_CLOSED,
ADDED_PLACEM... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/unit/test_scheduler.py | changedetectionio/tests/unit/test_scheduler.py | #!/usr/bin/env python3
# run from dir above changedetectionio/ dir
# python3 -m unittest changedetectionio.tests.unit.test_scheduler
import unittest
import arrow
class TestScheduler(unittest.TestCase):
# UTC+14:00 (Line Islands, Kiribati) is the farthest ahead, always ahead of UTC.
# UTC-12:00 (Baker Island... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/fetchers/test_content.py | changedetectionio/tests/fetchers/test_content.py | #!/usr/bin/env python3
import time
from flask import url_for
import os
from ..util import live_server_setup, wait_for_all_checks
import logging
# Requires playwright to be installed
def test_fetch_webdriver_content(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Se... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/fetchers/conftest.py | changedetectionio/tests/fetchers/conftest.py | #!/usr/bin/env python3
from .. import conftest
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/fetchers/__init__.py | changedetectionio/tests/fetchers/__init__.py | """Tests for the app."""
| python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/fetchers/test_custom_js_before_content.py | changedetectionio/tests/fetchers/test_custom_js_before_content.py | import os
from flask import url_for
from ..util import live_server_setup, wait_for_all_checks, extract_UUID_from_client
def test_execute_custom_js(client, live_server, measure_memory_usage, datastore_path):
# live_server_setup(live_server) # Setup on conftest per function
assert os.getenv('PLAYWRIGHT_DRIVER_... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/smtp/test_notification_smtp.py | changedetectionio/tests/smtp/test_notification_smtp.py | import time
from flask import url_for
from email import message_from_string
from email.policy import default as email_policy
from changedetectionio.diff import HTML_REMOVED_STYLE, HTML_ADDED_STYLE, HTML_CHANGED_STYLE, REMOVED_PLACEMARKER_OPEN, \
CHANGED_PLACEMARKER_OPEN, ADDED_PLACEMARKER_OPEN
from changedetection... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | true |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/tests/smtp/smtp-test-server.py | changedetectionio/tests/smtp/smtp-test-server.py | #!/usr/bin/env python3
import threading
import time
from aiosmtpd.controller import Controller
from flask import Flask, Response
from email import message_from_bytes
from email.policy import default
# Accept a SMTP message and offer a way to retrieve the last message via HTTP
last_received_message = b"SMTP Test Serve... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/blueprint.py | changedetectionio/conditions/blueprint.py | # Flask Blueprint Definition
import json
from flask import Blueprint
from changedetectionio.conditions import execute_ruleset_against_all_plugins
def construct_blueprint(datastore):
from changedetectionio.flask_app import login_optionally_required
conditions_blueprint = Blueprint('conditions', __name__, te... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/exceptions.py | changedetectionio/conditions/exceptions.py | class EmptyConditionRuleRowNotUsable(Exception):
def __init__(self):
super().__init__("One of the 'conditions' rulesets is incomplete, cannot run.")
def __str__(self):
return self.args[0] | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/pluggy_interface.py | changedetectionio/conditions/pluggy_interface.py | import pluggy
import os
import importlib
import sys
from . import default_plugin
# ✅ Ensure that the namespace in HookspecMarker matches PluginManager
PLUGIN_NAMESPACE = "changedetectionio_conditions"
hookspec = pluggy.HookspecMarker(PLUGIN_NAMESPACE)
hookimpl = pluggy.HookimplMarker(PLUGIN_NAMESPACE)
class Conditi... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/form.py | changedetectionio/conditions/form.py | # Condition Rule Form (for each rule row)
from wtforms import Form, SelectField, StringField, validators
from wtforms import validators
class ConditionFormRow(Form):
# ✅ Ensure Plugins Are Loaded BEFORE Importing Choices
from changedetectionio.conditions import plugin_manager
from changedetectionio.condit... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/__init__.py | changedetectionio/conditions/__init__.py | from json_logic.builtins import BUILTINS
from .exceptions import EmptyConditionRuleRowNotUsable
from .pluggy_interface import plugin_manager # Import the pluggy plugin manager
from . import default_plugin
from loguru import logger
# List of all supported JSON Logic operators
operator_choices = [
(None, "Choose on... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/default_plugin.py | changedetectionio/conditions/default_plugin.py | import re
import pluggy
from price_parser import Price
from loguru import logger
hookimpl = pluggy.HookimplMarker("changedetectionio_conditions")
@hookimpl
def register_operators():
def starts_with(_, text, prefix):
return text.lower().strip().startswith(str(prefix).strip().lower())
def ends_with(_... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/plugins/levenshtein_plugin.py | changedetectionio/conditions/plugins/levenshtein_plugin.py | """
Levenshtein distance and similarity plugin for text change detection.
Provides metrics for measuring text similarity between snapshots.
"""
import pluggy
from loguru import logger
LEVENSHTEIN_MAX_LEN_FOR_EDIT_STATS=100000
# Support both plugin systems
conditions_hookimpl = pluggy.HookimplMarker("changedetectionio... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/plugins/__init__.py | changedetectionio/conditions/plugins/__init__.py | # Import plugins package to make them discoverable | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/conditions/plugins/wordcount_plugin.py | changedetectionio/conditions/plugins/wordcount_plugin.py | """
Word count plugin for content analysis.
Provides word count metrics for snapshot content.
"""
import pluggy
from loguru import logger
# Support both plugin systems
conditions_hookimpl = pluggy.HookimplMarker("changedetectionio_conditions")
global_hookimpl = pluggy.HookimplMarker("changedetectionio")
def count_wor... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/__init__.py | changedetectionio/blueprint/__init__.py | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false | |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/backups/__init__.py | changedetectionio/blueprint/backups/__init__.py | import datetime
import glob
import threading
from flask import Blueprint, render_template, send_from_directory, flash, url_for, redirect, abort
from flask_babel import gettext
import os
from changedetectionio.store import ChangeDetectionStore
from changedetectionio.flask_app import login_optionally_required
from logu... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/browser_steps/browser_steps.py | changedetectionio/blueprint/browser_steps/browser_steps.py | import os
import time
import re
from random import randint
from loguru import logger
from changedetectionio.content_fetchers import SCREENSHOT_MAX_HEIGHT_DEFAULT
from changedetectionio.content_fetchers.base import manage_user_agent
from changedetectionio.jinja2_custom import render as jinja_render
# Two flags, tell... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/browser_steps/__init__.py | changedetectionio/blueprint/browser_steps/__init__.py |
# HORRIBLE HACK BUT WORKS :-) PR anyone?
#
# Why?
# `browsersteps_playwright_browser_interface.chromium.connect_over_cdp()` will only run once without async()
# - this flask app is not async()
# - A single timeout/keepalive which applies to the session made at .connect_over_cdp()
#
# So it means that we must unfortuna... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/settings/__init__.py | changedetectionio/blueprint/settings/__init__.py | import os
from copy import deepcopy
from datetime import datetime
from zoneinfo import ZoneInfo, available_timezones
import secrets
import flask_login
from flask import Blueprint, render_template, request, redirect, url_for, flash
from flask_babel import gettext
from changedetectionio.store import ChangeDetectionStore... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/price_data_follower/__init__.py | changedetectionio/blueprint/price_data_follower/__init__.py |
from changedetectionio.strtobool import strtobool
from flask import Blueprint, flash, redirect, url_for
from flask_login import login_required
from changedetectionio.store import ChangeDetectionStore
from changedetectionio import queuedWatchMetaData
from changedetectionio import worker_handler
from queue import Priori... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/watchlist/__init__.py | changedetectionio/blueprint/watchlist/__init__.py | import os
import time
from flask import Blueprint, request, make_response, render_template, redirect, url_for, flash, session
from flask_login import current_user
from flask_paginate import Pagination, get_page_parameter
from changedetectionio import forms
from changedetectionio import processors
from changedetection... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/check_proxies/__init__.py | changedetectionio/blueprint/check_proxies/__init__.py | import importlib
from concurrent.futures import ThreadPoolExecutor
from changedetectionio.processors.text_json_diff.processor import FilterNotFoundInResponse
from changedetectionio.store import ChangeDetectionStore
from functools import wraps
from flask import Blueprint
from flask_login import login_required
STATUS... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/rss/main_feed.py | changedetectionio/blueprint/rss/main_feed.py | from flask import make_response, request, url_for, redirect
def construct_main_feed_routes(rss_blueprint, datastore):
"""
Construct the main RSS feed routes.
Args:
rss_blueprint: The Flask blueprint to add routes to
datastore: The ChangeDetectionStore instance
"""
# Some RSS rea... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/rss/tag.py | changedetectionio/blueprint/rss/tag.py | def construct_tag_routes(rss_blueprint, datastore):
"""
Construct RSS feed routes for tags.
Args:
rss_blueprint: The Flask blueprint to add routes to
datastore: The ChangeDetectionStore instance
"""
@rss_blueprint.route("/tag/<string:tag_uuid>", methods=['GET'])
def rss_tag_fee... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/rss/blueprint.py | changedetectionio/blueprint/rss/blueprint.py |
from changedetectionio.store import ChangeDetectionStore
from flask import Blueprint
from . import tag as tag_routes
from . import main_feed
from . import single_watch
def construct_blueprint(datastore: ChangeDetectionStore):
"""
Construct and configure the RSS blueprint with all routes.
Args:
d... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/rss/single_watch.py | changedetectionio/blueprint/rss/single_watch.py |
def construct_single_watch_routes(rss_blueprint, datastore):
"""
Construct RSS feed routes for single watches.
Args:
rss_blueprint: The Flask blueprint to add routes to
datastore: The ChangeDetectionStore instance
"""
@rss_blueprint.route("/watch/<string:uuid>", methods=['GET'])
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/rss/_util.py | changedetectionio/blueprint/rss/_util.py | """
Utility functions for RSS feed generation.
"""
from changedetectionio.notification.handler import process_notification
from changedetectionio.notification_service import NotificationContextData, _check_cascading_vars
from loguru import logger
import datetime
import pytz
import re
BAD_CHARS_REGEX = r'[\x00-\x08\x... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/rss/__init__.py | changedetectionio/blueprint/rss/__init__.py | from copy import deepcopy
from loguru import logger
from changedetectionio.model import USE_SYSTEM_DEFAULT_NOTIFICATION_FORMAT_FOR_WATCH
from changedetectionio.notification import valid_notification_formats
RSS_CONTENT_FORMAT_DEFAULT = 'text'
# Some stuff not related
RSS_FORMAT_TYPES = deepcopy(valid_notification_fo... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/tags/form.py | changedetectionio/blueprint/tags/form.py | from wtforms import (
Form,
StringField,
SubmitField,
validators,
)
from wtforms.fields.simple import BooleanField
from changedetectionio.processors.restock_diff.forms import processor_settings_form as restock_settings_form
class group_restock_settings_form(restock_settings_form):
overrides_watch ... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/tags/__init__.py | changedetectionio/blueprint/tags/__init__.py | from flask import Blueprint, request, render_template, flash, url_for, redirect
from flask_babel import gettext
from changedetectionio.store import ChangeDetectionStore
from changedetectionio.flask_app import login_optionally_required
def construct_blueprint(datastore: ChangeDetectionStore):
tags_blueprint = Blu... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/ui/edit.py | changedetectionio/blueprint/ui/edit.py | from copy import deepcopy
import os
import importlib.resources
from flask import Blueprint, request, redirect, url_for, flash, render_template, abort
from flask_babel import gettext
from loguru import logger
from jinja2 import Environment, FileSystemLoader
from changedetectionio.store import ChangeDetectionStore
from ... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/ui/views.py | changedetectionio/blueprint/ui/views.py | from flask import Blueprint, request, redirect, url_for, flash
from flask_babel import gettext
from changedetectionio.store import ChangeDetectionStore
from changedetectionio.auth_decorator import login_optionally_required
from changedetectionio import worker_handler
def construct_blueprint(datastore: ChangeDetection... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/ui/diff.py | changedetectionio/blueprint/ui/diff.py | from flask import Blueprint, request, redirect, url_for, flash, render_template, make_response, send_from_directory
from flask_babel import gettext
import re
import importlib
from loguru import logger
from markupsafe import Markup
from changedetectionio.diff import (
REMOVED_STYLE, ADDED_STYLE, REMOVED_INNER_STYL... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/ui/preview.py | changedetectionio/blueprint/ui/preview.py | from flask import Blueprint, request, url_for, flash, render_template, redirect
from flask_babel import gettext
import time
from loguru import logger
from changedetectionio.store import ChangeDetectionStore
from changedetectionio.auth_decorator import login_optionally_required
from changedetectionio import html_tools
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/ui/__init__.py | changedetectionio/blueprint/ui/__init__.py | import time
from flask import Blueprint, request, redirect, url_for, flash, render_template, session
from flask_babel import gettext
from loguru import logger
from changedetectionio.store import ChangeDetectionStore
from changedetectionio.blueprint.ui.edit import construct_blueprint as construct_edit_blueprint
from ch... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/ui/notification.py | changedetectionio/blueprint/ui/notification.py | from flask import Blueprint, request, make_response
import random
from loguru import logger
from changedetectionio.store import ChangeDetectionStore
from changedetectionio.auth_decorator import login_optionally_required
def construct_blueprint(datastore: ChangeDetectionStore):
notification_blueprint = Blueprint('... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/imports/importer.py | changedetectionio/blueprint/imports/importer.py | from abc import abstractmethod
import time
from wtforms import ValidationError
from loguru import logger
from flask_babel import gettext
from changedetectionio.forms import validate_url
class Importer():
remaining_data = []
new_uuids = []
good = 0
def __init__(self):
self.new_uuids = []
... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
dgtlmoon/changedetection.io | https://github.com/dgtlmoon/changedetection.io/blob/0cb98229d67aa1203e745df586deb46834831859/changedetectionio/blueprint/imports/__init__.py | changedetectionio/blueprint/imports/__init__.py | from flask import Blueprint, request, redirect, url_for, flash, render_template
from changedetectionio.store import ChangeDetectionStore
from changedetectionio.auth_decorator import login_optionally_required
from changedetectionio import worker_handler
from changedetectionio.blueprint.imports.importer import (
impo... | python | Apache-2.0 | 0cb98229d67aa1203e745df586deb46834831859 | 2026-01-04T14:43:28.546632Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.