remove empty parenthesis in wikipedia's summary

They're usually IPA pronunciations which are removed
by the API.
This commit is contained in:
Marc Abonce Seguin 2019-08-25 22:47:23 -07:00
parent c18048e045
commit 5706c12fba
1 changed files with 1 additions and 0 deletions

View File

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