174 search_results = json.get(
'expertResponses')
176 search_results = search_results[0][
'advice'][
'categorySearchResult'][
'searchResult']
178 search_results = json.get(
'advice')
181 if not search_results:
184 for result
in search_results[
'results']:
188 'url': result[
'url'],
189 'title': result[
'title'],
190 'content': result[
'summary']
or result[
"topCategory"]
or result[
"displayUrl"]
or '',
191 'thumbnail': result.get(
'thumbnail',
''),
192 'publishedDate': datetime.strptime(result[
'pubDate'][:19],
'%Y-%m-%d %H:%M:%S'),
193 'metadata': gettext(
"Language") +
': ' + result.get(
'language',
''),
197 if search_results.get(
'nextResultSet'):
200 "engine_data": search_results.get(
'nextResultSet'),