[fix] presearch engine: Title showing <em> html code
This commit is contained in:
parent
eb3633629a
commit
4884747508
@ -161,7 +161,7 @@ def parse_search_query(json_results):
|
|||||||
for item in json_results.get('specialSections', {}).get('topStoriesCompact', {}).get('data', []):
|
for item in json_results.get('specialSections', {}).get('topStoriesCompact', {}).get('data', []):
|
||||||
result = {
|
result = {
|
||||||
'url': item['link'],
|
'url': item['link'],
|
||||||
'title': item['title'],
|
'title': html_to_text(item['title']),
|
||||||
'thumbnail': item['image'],
|
'thumbnail': item['image'],
|
||||||
'content': '',
|
'content': '',
|
||||||
'metadata': item.get('source'),
|
'metadata': item.get('source'),
|
||||||
@ -171,7 +171,7 @@ def parse_search_query(json_results):
|
|||||||
for item in json_results.get('standardResults', []):
|
for item in json_results.get('standardResults', []):
|
||||||
result = {
|
result = {
|
||||||
'url': item['link'],
|
'url': item['link'],
|
||||||
'title': item['title'],
|
'title': html_to_text(item['title']),
|
||||||
'content': html_to_text(item['description']),
|
'content': html_to_text(item['description']),
|
||||||
}
|
}
|
||||||
results.append(result)
|
results.append(result)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user