Setting for Extract <title> as title option on individual watches (#229)

* Extract <title> as title option on individual items
This commit is contained in:
dgtlmoon
2021-09-19 22:57:15 +02:00
committed by GitHub
parent 6901fc493d
commit 25476bfcb2
6 changed files with 15 additions and 6 deletions

View File

@@ -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