Browse Source

remove empty parenthesis in wikipedia's summary

They're usually IPA pronunciations which are removed
by the API.
Marc Abonce Seguin 5 years ago
parent
commit
5706c12fba
1 changed files with 1 additions and 0 deletions
  1. 1 0
      searx/engines/wikipedia.py

+ 1 - 0
searx/engines/wikipedia.py

@@ -100,6 +100,7 @@ def response(resp):
     extract = page.get('extract')
 
     summary = extract_first_paragraph(extract, title, image)
+    summary = summary.replace('() ', '')
 
     # link to wikipedia article
     wikipedia_link = base_url.format(language=url_lang(resp.search_params['language'])) \