[fix] urls merge in infobox (#593)

TODO:
    merge attributes
This commit is contained in:
marc 2016-06-24 00:38:17 -05:00
parent a0a1284998
commit c2e4014287
2 changed files with 25 additions and 21 deletions

View file

@ -99,9 +99,8 @@ def response(resp):
return []
# link to wikipedia article
# parenthesis are not quoted to make infobox mergeable with wikidata's
wikipedia_link = url_lang(resp.search_params['language']) \
+ 'wiki/' + quote(title.replace(' ', '_').encode('utf8')).replace('%28', '(').replace('%29', ')')
+ 'wiki/' + quote(title.replace(' ', '_').encode('utf8'))
results.append({'url': wikipedia_link, 'title': title})