From 3d709211758bcd85c6cabc7619151065f0086868 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Wed, 27 May 2015 12:08:50 +0200 Subject: [PATCH] [fix] bing_news --- searx/engines/bing_news.py | 2 +- searx/tests/engines/test_bing_news.py | 32 +++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/searx/engines/bing_news.py b/searx/engines/bing_news.py index 1e5d361c..56be4b91 100644 --- a/searx/engines/bing_news.py +++ b/searx/engines/bing_news.py @@ -65,7 +65,7 @@ def response(resp): # parse publishedDate publishedDateXPath = result.xpath('.//div[@class="sn_txt"]/div' - '//span[contains(@class,"sn_ST")]' + '//div[contains(@class,"sn_ST")]' '//span[contains(@class,"sn_tm")]') publishedDate = escape(extract_text(publishedDateXPath)) diff --git a/searx/tests/engines/test_bing_news.py b/searx/tests/engines/test_bing_news.py index f22b80e8..4ef0c3af 100644 --- a/searx/tests/engines/test_bing_news.py +++ b/searx/tests/engines/test_bing_news.py @@ -52,11 +52,11 @@ class TestBingNewsEngine(SearxTestCase):
Article Content - +
metronews.fr  · 44 minutes ago - +
@@ -84,11 +84,11 @@ class TestBingNewsEngine(SearxTestCase):
Article Content - +
metronews.fr  · 44 minutes ago - +
@@ -106,11 +106,11 @@ class TestBingNewsEngine(SearxTestCase):
Article Content - +
metronews.fr  · 3 hours, 44 minutes ago - +
@@ -128,11 +128,11 @@ class TestBingNewsEngine(SearxTestCase):
Article Content - +
metronews.fr  · 44 hours ago - +
@@ -150,11 +150,11 @@ class TestBingNewsEngine(SearxTestCase):
Article Content - +
metronews.fr  · 2 days ago - +
@@ -172,11 +172,11 @@ class TestBingNewsEngine(SearxTestCase):
Article Content - +
metronews.fr  · 27/01/2015 - +
@@ -194,11 +194,11 @@ class TestBingNewsEngine(SearxTestCase):
Article Content - +
metronews.fr  · Il y a 3 heures - +
@@ -222,11 +222,11 @@ class TestBingNewsEngine(SearxTestCase):
Article Content - +
metronews.fr  · 44 minutes ago - +
"""