summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-05-27 14:51:11 -0400
committerAdam Tauber <asciimoo@gmail.com>2015-05-27 14:51:11 -0400
commitbd4b752f14ff2bc8a4fc499c2a391839d2e276d9 (patch)
tree4cfae1bb0dcf0b0e7f1ebddbb1bd02499fbb414d
parent37eb0fb1308bdbf78feb75d82e1e990c5b1bce64 (diff)
parent3d709211758bcd85c6cabc7619151065f0086868 (diff)
downloadsearxng-bd4b752f14ff2bc8a4fc499c2a391839d2e276d9.tar.gz
searxng-bd4b752f14ff2bc8a4fc499c2a391839d2e276d9.zip
Merge pull request #332 from dalf/bing_news
[fix] bing_news - fixes #328
-rw-r--r--searx/engines/bing_news.py2
-rw-r--r--searx/tests/engines/test_bing_news.py32
2 files changed, 17 insertions, 17 deletions
diff --git a/searx/engines/bing_news.py b/searx/engines/bing_news.py
index 1e5d361c1..56be4b912 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 f22b80e87..4ef0c3af7 100644
--- a/searx/tests/engines/test_bing_news.py
+++ b/searx/tests/engines/test_bing_news.py
@@ -52,11 +52,11 @@ class TestBingNewsEngine(SearxTestCase):
<div class="sn_txt">
<div class="sn_oi">
<span class="sn_snip">Article Content</span>
- <span class="sn_ST">
+ <div class="sn_ST">
<cite class="sn_src">metronews.fr</cite>
&nbsp;&#0183;&#32;
<span class="sn_tm">44 minutes ago</span>
- </span>
+ </div>
</div>
</div>
</div>
@@ -84,11 +84,11 @@ class TestBingNewsEngine(SearxTestCase):
<div class="sn_txt">
<div class="sn_oi">
<span class="sn_snip">Article Content</span>
- <span class="sn_ST">
+ <div class="sn_ST">
<cite class="sn_src">metronews.fr</cite>
&nbsp;&#0183;&#32;
<span class="sn_tm">44 minutes ago</span>
- </span>
+ </div>
</div>
</div>
</div>
@@ -106,11 +106,11 @@ class TestBingNewsEngine(SearxTestCase):
<div class="sn_txt">
<div class="sn_oi">
<span class="sn_snip">Article Content</span>
- <span class="sn_ST">
+ <div class="sn_ST">
<cite class="sn_src">metronews.fr</cite>
&nbsp;&#0183;&#32;
<span class="sn_tm">3 hours, 44 minutes ago</span>
- </span>
+ </div>
</div>
</div>
</div>
@@ -128,11 +128,11 @@ class TestBingNewsEngine(SearxTestCase):
<div class="sn_txt">
<div class="sn_oi">
<span class="sn_snip">Article Content</span>
- <span class="sn_ST">
+ <div class="sn_ST">
<cite class="sn_src">metronews.fr</cite>
&nbsp;&#0183;&#32;
<span class="sn_tm">44 hours ago</span>
- </span>
+ </div>
</div>
</div>
</div>
@@ -150,11 +150,11 @@ class TestBingNewsEngine(SearxTestCase):
<div class="sn_txt">
<div class="sn_oi">
<span class="sn_snip">Article Content</span>
- <span class="sn_ST">
+ <div class="sn_ST">
<cite class="sn_src">metronews.fr</cite>
&nbsp;&#0183;&#32;
<span class="sn_tm">2 days ago</span>
- </span>
+ </div>
</div>
</div>
</div>
@@ -172,11 +172,11 @@ class TestBingNewsEngine(SearxTestCase):
<div class="sn_txt">
<div class="sn_oi">
<span class="sn_snip">Article Content</span>
- <span class="sn_ST">
+ <div class="sn_ST">
<cite class="sn_src">metronews.fr</cite>
&nbsp;&#0183;&#32;
<span class="sn_tm">27/01/2015</span>
- </span>
+ </div>
</div>
</div>
</div>
@@ -194,11 +194,11 @@ class TestBingNewsEngine(SearxTestCase):
<div class="sn_txt">
<div class="sn_oi">
<span class="sn_snip">Article Content</span>
- <span class="sn_ST">
+ <div class="sn_ST">
<cite class="sn_src">metronews.fr</cite>
&nbsp;&#0183;&#32;
<span class="sn_tm">Il y a 3 heures</span>
- </span>
+ </div>
</div>
</div>
</div>
@@ -222,11 +222,11 @@ class TestBingNewsEngine(SearxTestCase):
<div class="sn_txt">
<div class="sn_oi">
<span class="sn_snip">Article Content</span>
- <span class="sn_ST">
+ <div class="sn_ST">
<cite class="sn_src">metronews.fr</cite>
&nbsp;&#0183;&#32;
<span class="sn_tm">44 minutes ago</span>
- </span>
+ </div>
</div>
</div>
"""