[fix] mwmbl: crash if there's no result description available

This commit is contained in:
Sai Asish Y
2026-05-05 12:40:20 -07:00
committed by GitHub
parent d3566fe8a8
commit 0ac5254b8e
+2 -1
View File
@@ -39,11 +39,12 @@ def response(resp):
for result in json_results:
title_parts = [title['value'] for title in result['title']]
extract_parts = [extract['value'] for extract in result.get('extract', [])]
results.append(
{
'url': result['url'],
'title': ''.join(title_parts),
'content': result['extract'][0]['value'],
'content': ''.join(extract_parts),
}
)