diff options
author | Adam Tauber <asciimoo@gmail.com> | 2016-12-28 20:00:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-28 20:00:53 +0100 |
commit | 8bff42f049dcac77559beaf2932a47921feb1d49 (patch) | |
tree | 00fd6b0b14773c0e20425d4a6478d67f244d64ed /searx/engines/google_news.py | |
parent | f30d5e87938275219852c94d57771e182bfa435b (diff) | |
parent | ea034fafa994227ea89662710901e73cb901e28c (diff) | |
download | searxng-8bff42f049dcac77559beaf2932a47921feb1d49.tar.gz searxng-8bff42f049dcac77559beaf2932a47921feb1d49.zip |
Merge branch 'master' into languages
Diffstat (limited to 'searx/engines/google_news.py')
-rw-r--r-- | searx/engines/google_news.py | 6 |
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) |