diff --git a/MANIFEST.in b/MANIFEST.in index ace5309f..16459b79 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,6 @@ recursive-include changedetectionio/templates * recursive-include changedetectionio/static * include changedetection.py -global-exclude *.pyc \ No newline at end of file +global-exclude *.pyc +global-exclude *node_modules* +global-exclude venv \ No newline at end of file diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 40593aba..f678adaf 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -411,7 +411,9 @@ def changedetection_app(config=None, datastore_o=None): 'fetch_backend': form.fetch_backend.data, 'trigger_text': form.trigger_text.data, 'notification_title': form.notification_title.data, - 'notification_body': form.notification_body.data + 'notification_body': form.notification_body.data, + 'extract_title_as_title': form.extract_title_as_title.data + } # Notification URLs diff --git a/changedetectionio/fetch_site_status.py b/changedetectionio/fetch_site_status.py index 18f2b0bd..fc8c1e6e 100644 --- a/changedetectionio/fetch_site_status.py +++ b/changedetectionio/fetch_site_status.py @@ -170,9 +170,10 @@ class perform_site_check(): update_obj["previous_md5"] = fetched_md5 # Extract title as title - if is_html and self.datastore.data['settings']['application']['extract_title_as_title']: - if not watch['title'] or not len(watch['title']): - update_obj['title'] = html_tools.extract_element(find='title', html_content=fetcher.content) + if is_html: + if self.datastore.data['settings']['application']['extract_title_as_title'] or watch['extract_title_as_title']: + if not watch['title'] or not len(watch['title']): + update_obj['title'] = html_tools.extract_element(find='title', html_content=fetcher.content) return changed_detected, update_obj, stripped_text_from_html diff --git a/changedetectionio/forms.py b/changedetectionio/forms.py index 4bc39215..62b30b20 100644 --- a/changedetectionio/forms.py +++ b/changedetectionio/forms.py @@ -203,6 +203,7 @@ class commonSettingsForm(Form): notification_body = TextAreaField('Notification Body', default='{watch_url} had a change.', validators=[validators.Optional(), ValidateTokensList()]) trigger_check = BooleanField('Send test notification on save') fetch_backend = RadioField(u'Fetch Method', choices=content_fetcher.available_fetchers(), validators=[ValidateContentFetcherIsReady()]) + extract_title_as_title = BooleanField('Extract
The Chrome/Javascript method requires a network connection to a running WebDriver+Chrome server.
+