From 0226ae69d361dc28cfbb4a89a29a86ea02963b11 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 4 Dec 2020 16:47:43 +0100 Subject: [PATCH] [fix] dbpedia autocomplete (and use HTTPS) --- searx/autocomplete.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/searx/autocomplete.py b/searx/autocomplete.py index 420b8a46..fbe634a5 100644 --- a/searx/autocomplete.py +++ b/searx/autocomplete.py @@ -113,7 +113,7 @@ def searx_bang(full_query): def dbpedia(query, lang): # dbpedia autocompleter, no HTTPS - autocomplete_url = 'http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?' + autocomplete_url = 'https://lookup.dbpedia.org/api/search.asmx/KeywordSearch?' response = get(autocomplete_url + urlencode(dict(QueryString=query))) @@ -121,8 +121,7 @@ def dbpedia(query, lang): if response.ok: dom = etree.fromstring(response.content) - results = dom.xpath('//a:Result/a:Label//text()', - namespaces={'a': 'http://lookup.dbpedia.org/'}) + results = dom.xpath('//Result/Label//text()') return results