1
0
mirror of https://github.com/searx/searx synced 2024-12-12 08:46:26 +01:00

[fix] wikipedia: remove HTML from the title

fr.wikipedia.org (and it seems not other wikipedia websites),
adds HTML to api_result['displayTitle'].
(Search for '!wp :fr Braid' for example)

The commit uses api_result['title']
This commit is contained in:
Alexandre Flament 2021-03-25 08:31:39 +01:00
parent 06b754ad67
commit fcfcf662ff

View File

@ -76,7 +76,7 @@ def response(resp):
if api_result.get('type') != 'standard':
return []
title = api_result['displaytitle']
title = api_result['title']
wikipedia_link = api_result['content_urls']['desktop']['page']
results.append({'url': wikipedia_link, 'title': title})