summaryrefslogtreecommitdiff
path: root/searx/engines/yahoo.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-02-12 10:52:55 +0100
committerAdam Tauber <asciimoo@gmail.com>2015-02-12 10:52:55 +0100
commitf6db77d81ea87d99462b4c3cc40a8a27e0264724 (patch)
treeb26fb71a62082aeec81c7bb1bb3d7447d006aed3 /searx/engines/yahoo.py
parent516105c570a920dadeb87b34ee5ee434ad5cb16f (diff)
parentf96154b7c454a3b02bf688f248b4471c2020c28f (diff)
Merge pull request #210 from Cqoicebordel/unit-tests
unit tests
Diffstat (limited to 'searx/engines/yahoo.py')
-rw-r--r--searx/engines/yahoo.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py
index c6c5b0d0d..161f7513b 100644
--- a/searx/engines/yahoo.py
+++ b/searx/engines/yahoo.py
@@ -35,7 +35,7 @@ suggestion_xpath = '//div[@id="satat"]//a'
def parse_url(url_string):
endings = ['/RS', '/RK']
endpositions = []
- start = url_string.find('http', url_string.find('/RU=')+1)
+ start = url_string.find('http', url_string.find('/RU=') + 1)
for ending in endings:
endpos = url_string.rfind(ending)
@@ -91,7 +91,7 @@ def response(resp):
'content': content})
# if no suggestion found, return results
- if not suggestion_xpath:
+ if not dom.xpath(suggestion_xpath):
return results
# parse suggestion