diff options
author | Alexandre Flament <alex@al-f.net> | 2020-12-04 16:47:43 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2020-12-04 16:47:43 +0100 |
commit | 0226ae69d361dc28cfbb4a89a29a86ea02963b11 (patch) | |
tree | fb046d6183a895c3b1ecbba6f1137b66bafb66a0 /searx/autocomplete.py | |
parent | cec73b5dcf6e94918798c6e1e6457dd021a34a39 (diff) | |
download | searxng-0226ae69d361dc28cfbb4a89a29a86ea02963b11.tar.gz searxng-0226ae69d361dc28cfbb4a89a29a86ea02963b11.zip |
[fix] dbpedia autocomplete (and use HTTPS)
Diffstat (limited to 'searx/autocomplete.py')
-rw-r--r-- | searx/autocomplete.py | 5 |
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 |