summaryrefslogtreecommitdiff
path: root/searx/engines/google_news.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/google_news.py')
-rw-r--r--searx/engines/google_news.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/searx/engines/google_news.py b/searx/engines/google_news.py
index ddacd1a61..49c6a5d50 100644
--- a/searx/engines/google_news.py
+++ b/searx/engines/google_news.py
@@ -72,9 +72,9 @@ def response(resp):
'content': ''.join(result.xpath('.//div[@class="st"]//text()')),
}
- img = result.xpath('.//img/@src')[0]
- if img and not img.startswith('data'):
- r['img_src'] = img
+ imgs = result.xpath('.//img/@src')
+ if len(imgs) and not imgs[0].startswith('data'):
+ r['img_src'] = imgs[0]
results.append(r)