summaryrefslogtreecommitdiff
path: root/searx/engines/tagesschau.py
diff options
context:
space:
mode:
authorBnyro <bnyro@tutanota.com>2023-09-28 19:14:30 +0200
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-09-30 11:00:11 +0200
commit159629c5887452f8aaebef504a172108d74e50fe (patch)
treeb3f65b7f4a49352c05a18cfe77c1a7d1c5674148 /searx/engines/tagesschau.py
parent2ca60a19fc4ed8f74237e4befde9c6bc31a66941 (diff)
[mod] tagesschau: add option to only use tagesschau urls
Diffstat (limited to 'searx/engines/tagesschau.py')
-rw-r--r--searx/engines/tagesschau.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/searx/engines/tagesschau.py b/searx/engines/tagesschau.py
index e50be90d0..cfa184025 100644
--- a/searx/engines/tagesschau.py
+++ b/searx/engines/tagesschau.py
@@ -42,6 +42,17 @@ paging = True
results_per_page = 10
base_url = "https://www.tagesschau.de"
+use_source_url = True
+"""When set to false, display URLs from Tagesschau, and not the actual source
+(e.g. NDR, WDR, SWR, HR, ...)
+
+.. note::
+
+ The actual source may contain additional content, such as commentary, that is
+ not displayed in the Tagesschau.
+
+"""
+
def request(query, params):
args = {
@@ -78,7 +89,7 @@ def _story(item):
'thumbnail': item.get('teaserImage', {}).get('imageVariants', {}).get('16x9-256'),
'publishedDate': datetime.strptime(item['date'][:19], '%Y-%m-%dT%H:%M:%S'),
'content': item['firstSentence'],
- 'url': item['shareURL'],
+ 'url': item['shareURL'] if use_source_url else item['detailsweb'],
}