summaryrefslogtreecommitdiff
path: root/searx/engines/bing_news.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2015-05-02 15:45:17 +0200
committerAlexandre Flament <alex@al-f.net>2015-05-02 15:45:17 +0200
commit4689fe341ca7c7231d0409526b9ee0f2eadde445 (patch)
tree12d51f3471b2dfd448768cb8e540ee4668869453 /searx/engines/bing_news.py
parentbbd83f5a519381ac7ea690a1645258d106a9ba8a (diff)
downloadsearxng-4689fe341ca7c7231d0409526b9ee0f2eadde445.tar.gz
searxng-4689fe341ca7c7231d0409526b9ee0f2eadde445.zip
update versions.cfg to use the current up-to-date packages
Diffstat (limited to 'searx/engines/bing_news.py')
-rw-r--r--searx/engines/bing_news.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/searx/engines/bing_news.py b/searx/engines/bing_news.py
index e6adb2644..1e5d361c1 100644
--- a/searx/engines/bing_news.py
+++ b/searx/engines/bing_news.py
@@ -1,13 +1,15 @@
-## Bing (News)
-#
-# @website https://www.bing.com/news
-# @provide-api yes (http://datamarket.azure.com/dataset/bing/search),
-# max. 5000 query/month
-#
-# @using-api no (because of query limit)
-# @results HTML (using search portal)
-# @stable no (HTML can change)
-# @parse url, title, content, publishedDate
+"""
+ Bing (News)
+
+ @website https://www.bing.com/news
+ @provide-api yes (http://datamarket.azure.com/dataset/bing/search),
+ max. 5000 query/month
+
+ @using-api no (because of query limit)
+ @results HTML (using search portal)
+ @stable no (HTML can change)
+ @parse url, title, content, publishedDate
+"""
from urllib import urlencode
from cgi import escape
@@ -87,6 +89,8 @@ def response(resp):
publishedDate = parser.parse(publishedDate, dayfirst=False)
except TypeError:
publishedDate = datetime.now()
+ except ValueError:
+ publishedDate = datetime.now()
# append result
results.append({'url': url,