summaryrefslogtreecommitdiff
path: root/searx/autocomplete.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-12-04 16:47:43 +0100
committerAlexandre Flament <alex@al-f.net>2020-12-04 16:47:43 +0100
commit0226ae69d361dc28cfbb4a89a29a86ea02963b11 (patch)
treefb046d6183a895c3b1ecbba6f1137b66bafb66a0 /searx/autocomplete.py
parentcec73b5dcf6e94918798c6e1e6457dd021a34a39 (diff)
downloadsearxng-0226ae69d361dc28cfbb4a89a29a86ea02963b11.tar.gz
searxng-0226ae69d361dc28cfbb4a89a29a86ea02963b11.zip
[fix] dbpedia autocomplete (and use HTTPS)
Diffstat (limited to 'searx/autocomplete.py')
-rw-r--r--searx/autocomplete.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/autocomplete.py b/searx/autocomplete.py
index 420b8a461..fbe634a5b 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