summaryrefslogtreecommitdiff
path: root/searx/engines/wikidata.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2014-10-12 14:33:03 +0200
committerAdam Tauber <asciimoo@gmail.com>2014-10-12 14:33:03 +0200
commitb0bb94fd377da826b2b720e65e558fbeb932bc4c (patch)
tree8f7a891f9c34e7fadee38a1c089f453945138997 /searx/engines/wikidata.py
parent13f36e667572c57fb3e5f279102294cc36c07d49 (diff)
downloadsearxng-b0bb94fd377da826b2b720e65e558fbeb932bc4c.tar.gz
searxng-b0bb94fd377da826b2b720e65e558fbeb932bc4c.zip
[fix] wikidata: using only the first url
Diffstat (limited to 'searx/engines/wikidata.py')
-rw-r--r--searx/engines/wikidata.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/engines/wikidata.py b/searx/engines/wikidata.py
index 761f8f73c..7877e1198 100644
--- a/searx/engines/wikidata.py
+++ b/searx/engines/wikidata.py
@@ -64,7 +64,7 @@ def getDetail(jsonresponse, wikidata_id, language):
misc_language = get_wiki_firstlanguage(result, 'wiki')
if misc_language != None:
add_url(urls, 'Wikipedia (' + misc_language + ')', get_wikilink(result, misc_language + 'wiki'))
-
+
if language != 'en':
add_url(urls, 'Wiki voyage (' + language + ')', get_wikilink(result, language + 'wikivoyage'))
add_url(urls, 'Wiki voyage (en)', get_wikilink(result, 'enwikivoyage'))
@@ -163,7 +163,8 @@ def get_string(claims, propertyName, defaultValue=None):
if len(result) == 0:
return defaultValue
else:
- return ', '.join(result)
+ #TODO handle multiple urls
+ return result[0]
def get_time(claims, propertyName, defaultValue=None):