summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-03-04 15:06:27 +0100
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-03-04 15:06:27 +0100
commit07f83cab224d2ddf1f7fd8b544f2f2d6679c2416 (patch)
tree704746222d964c82213efaa75840f6f85e85cde9 /searx/engines
parentfe35c86c947f503ae2e1e7633d3355204e48ae12 (diff)
parent71c2e8222bc5d7115e8e2ed415057f66da3a2f09 (diff)
Merge remote-tracking branch 'asciimoo/master'
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/google_news.py2
-rw-r--r--searx/engines/yahoo.py2
-rw-r--r--searx/engines/yahoo_news.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/searx/engines/google_news.py b/searx/engines/google_news.py
index ca27a5b2f..935718609 100644
--- a/searx/engines/google_news.py
+++ b/searx/engines/google_news.py
@@ -6,7 +6,7 @@ from json import loads
categories = ['news']
url = 'https://ajax.googleapis.com/'
-search_url = url + 'ajax/services/search/news?v=2.0&start={offset}&rsz=large&safe=off&filter=off&{query}&hl={language}' # noqa
+search_url = url + 'ajax/services/search/news?v=2.0&start={offset}&rsz=large&safe=off&filter=off&{query}&hl={language}' # noqa
paging = True
language_support = True
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index f83b4b967..f070b8a7d 100644
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -35,7 +35,7 @@ def response(resp):
for result in dom.xpath(results_xpath):
url_string = extract_url(result.xpath(url_xpath), search_url)
- start = url_string.find('/RU=')+4
+ start = url_string.find('http', url_string.find('/RU=')+1)
end = url_string.rfind('/RS')
url = unquote(url_string[start:end])
title = extract_text(result.xpath(title_xpath)[0])
diff --git a/searx/engines/yahoo_news.py b/searx/engines/yahoo_news.py
index 6ece496cd..3c257866c 100644
--- a/searx/engines/yahoo_news.py
+++ b/searx/engines/yahoo_news.py
@@ -35,7 +35,7 @@ def response(resp):
for result in dom.xpath(results_xpath):
url_string = extract_url(result.xpath(url_xpath), search_url)
- start = url_string.find('/RU=')+4
+ start = url_string.find('http', url_string.find('/RU=')+1)
end = url_string.rfind('/RS')
url = unquote(url_string[start:end])
title = extract_text(result.xpath(title_xpath)[0])