diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 98f1a954..24718357 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -552,6 +552,7 @@ def changedetection_app(config=None, datastore_o=None): if request.method == 'GET': form.minutes_between_check.data = int(datastore.data['settings']['requests']['minutes_between_check']) form.notification_urls.data = datastore.data['settings']['application']['notification_urls'] + form.global_ignore_text.data = datastore.data['settings']['application']['global_ignore_text'] form.extract_title_as_title.data = datastore.data['settings']['application']['extract_title_as_title'] form.fetch_backend.data = datastore.data['settings']['application']['fetch_backend'] form.notification_title.data = datastore.data['settings']['application']['notification_title'] @@ -578,7 +579,8 @@ def changedetection_app(config=None, datastore_o=None): datastore.data['settings']['application']['notification_format'] = form.notification_format.data datastore.data['settings']['application']['notification_urls'] = form.notification_urls.data datastore.data['settings']['application']['base_url'] = form.base_url.data - + datastore.data['settings']['application']['global_ignore_text'] = form.global_ignore_text.data + if form.trigger_check.data: if len(form.notification_urls.data): n_object = {'watch_url': "Test from changedetection.io!", diff --git a/changedetectionio/fetch_site_status.py b/changedetectionio/fetch_site_status.py index 69ff7de0..dec73987 100644 --- a/changedetectionio/fetch_site_status.py +++ b/changedetectionio/fetch_site_status.py @@ -129,11 +129,11 @@ class perform_site_check(): update_obj["last_check_status"] = fetcher.get_last_status_code() update_obj["last_error"] = False - # If there's text to skip # @todo we could abstract out the get_text() to handle this cleaner - if len(watch['ignore_text']): - stripped_text_from_html = self.strip_ignore_text(stripped_text_from_html, watch['ignore_text']) + text_to_ignore = watch.get('ignore_text', []) + self.datastore.data['settings']['application'].get('global_ignore_text', []) + if len(text_to_ignore): + stripped_text_from_html = self.strip_ignore_text(stripped_text_from_html, text_to_ignore) else: stripped_text_from_html = stripped_text_from_html.encode('utf8') diff --git a/changedetectionio/forms.py b/changedetectionio/forms.py index dc06c67a..586a27bb 100644 --- a/changedetectionio/forms.py +++ b/changedetectionio/forms.py @@ -258,3 +258,4 @@ class globalSettingsForm(commonSettingsForm): [validators.NumberRange(min=1)]) extract_title_as_title = BooleanField('Extract