forked from zaclys/searxng
[mod] tagesschau: add option to only use tagesschau urls
This commit is contained in:
parent
07d932fba0
commit
3b51a0bf0f
|
@ -42,6 +42,17 @@ paging = True
|
||||||
results_per_page = 10
|
results_per_page = 10
|
||||||
base_url = "https://www.tagesschau.de"
|
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):
|
def request(query, params):
|
||||||
args = {
|
args = {
|
||||||
|
@ -78,7 +89,7 @@ def _story(item):
|
||||||
'thumbnail': item.get('teaserImage', {}).get('imageVariants', {}).get('16x9-256'),
|
'thumbnail': item.get('teaserImage', {}).get('imageVariants', {}).get('16x9-256'),
|
||||||
'publishedDate': datetime.strptime(item['date'][:19], '%Y-%m-%dT%H:%M:%S'),
|
'publishedDate': datetime.strptime(item['date'][:19], '%Y-%m-%dT%H:%M:%S'),
|
||||||
'content': item['firstSentence'],
|
'content': item['firstSentence'],
|
||||||
'url': item['shareURL'],
|
'url': item['shareURL'] if use_source_url else item['detailsweb'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1486,6 +1486,9 @@ engines:
|
||||||
|
|
||||||
- name: tagesschau
|
- name: tagesschau
|
||||||
engine: tagesschau
|
engine: tagesschau
|
||||||
|
# when set to false, display URLs from Tagesschau, and not the actual source
|
||||||
|
# (e.g. NDR, WDR, SWR, HR, ...)
|
||||||
|
use_source_url: true
|
||||||
shortcut: ts
|
shortcut: ts
|
||||||
disabled: true
|
disabled: true
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue