summaryrefslogtreecommitdiff
path: root/searx/engines/yahoo_news.py
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-26 19:11:28 +0100
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-26 19:11:28 +0100
commit0e1035eac1a3359edb44c998abc7f76d6f7ad985 (patch)
tree3ef91532383f713324239a6797f0219da129236f /searx/engines/yahoo_news.py
parentc36c935b03cc87ddfcac5ce3ded333be73387a7a (diff)
parent79f1676e318d36704687966fd124b7f29ddc21fa (diff)
Merge https://github.com/asciimoo/searx into template_oscar
Conflicts: searx/translations/de/LC_MESSAGES/messages.po searx/translations/en/LC_MESSAGES/messages.po searx/translations/es/LC_MESSAGES/messages.po searx/translations/fr/LC_MESSAGES/messages.po searx/translations/hu/LC_MESSAGES/messages.po searx/translations/it/LC_MESSAGES/messages.po searx/translations/nl/LC_MESSAGES/messages.po searx/webapp.py
Diffstat (limited to 'searx/engines/yahoo_news.py')
-rw-r--r--searx/engines/yahoo_news.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/searx/engines/yahoo_news.py b/searx/engines/yahoo_news.py
index c07d7e185..4a7dd16ea 100644
--- a/searx/engines/yahoo_news.py
+++ b/searx/engines/yahoo_news.py
@@ -1,8 +1,9 @@
-## Yahoo (News)
-#
+# Yahoo (News)
+#
# @website https://news.yahoo.com
-# @provide-api yes (https://developer.yahoo.com/boss/search/), $0.80/1000 queries
-#
+# @provide-api yes (https://developer.yahoo.com/boss/search/)
+# $0.80/1000 queries
+#
# @using-api no (because pricing)
# @results HTML (using search portal)
# @stable no (HTML can change)
@@ -22,7 +23,7 @@ paging = True
language_support = True
# search-url
-search_url = 'https://news.search.yahoo.com/search?{query}&b={offset}&fl=1&vl=lang_{lang}'
+search_url = 'https://news.search.yahoo.com/search?{query}&b={offset}&fl=1&vl=lang_{lang}' # noqa
# specific xpath variables
results_xpath = '//div[@class="res"]'
@@ -41,7 +42,7 @@ def request(query, params):
language = 'en'
else:
language = params['language'].split('_')[0]
-
+
params['url'] = search_url.format(offset=offset,
query=urlencode({'p': query}),
lang=language)