SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[mod] tagesschau: add option to only use tagesschau urls
Bnyro159629c58874
diff --git a/searx/engines/tagesschau.py b/searx/engines/tagesschau.pyindex e50be90d0..cfa184025 100644--- a/searx/engines/tagesschau.py+++ b/searx/engines/tagesschau.py@@ -42,6 +42,17 @@ paging = Trueresults_per_page = 10base_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'],}diff --git a/searx/settings.yml b/searx/settings.ymlindex ea7a3073d..848dc95df 100644--- a/searx/settings.yml+++ b/searx/settings.yml@@ -1486,6 +1486,9 @@ engines:- name: tagesschauengine: tagesschau+ # when set to false, display URLs from Tagesschau, and not the actual source+ # (e.g. NDR, WDR, SWR, HR, ...)+ use_source_url: trueshortcut: tsdisabled: true