summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorjazzzooo <38244149+jazzzooo@users.noreply.github.com>2023-09-15 11:57:03 -0700
committerMarkus Heiser <markus.heiser@darmarIT.de>2023-09-15 22:00:09 +0200
commit27477f51fdd91bcea4282da462c2923070524e20 (patch)
tree2cb53470df1d2b3f7effffe9b9acda9c16ffb1e7 /searx/engines
parent140125e6417381042c57bdbeaffb1c8de0364543 (diff)
downloadsearxng-27477f51fdd91bcea4282da462c2923070524e20.tar.gz
searxng-27477f51fdd91bcea4282da462c2923070524e20.zip
[fix] brave.news
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/brave.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/engines/brave.py b/searx/engines/brave.py
index f1fad6292..adac37d8d 100644
--- a/searx/engines/brave.py
+++ b/searx/engines/brave.py
@@ -219,8 +219,7 @@ def response(resp):
json_resp = json_data[1]['data']['body']['response']
if brave_category == 'news':
- json_resp = json_resp['news']
- return _parse_news(json_resp)
+ return _parse_news(json_resp['news'])
if brave_category == 'images':
return _parse_images(json_resp)
@@ -299,7 +298,7 @@ def _parse_news(json_resp):
'title': result['title'],
'content': result['description'],
}
- if result['thumbnail'] != "null":
+ if result['thumbnail'] is not None:
item['img_src'] = result['thumbnail']['src']
result_list.append(item)