diff options
author | Cqoicebordel <Cqoicebordel@users.noreply.github.com> | 2015-02-04 20:41:40 +0100 |
---|---|---|
committer | Cqoicebordel <Cqoicebordel@users.noreply.github.com> | 2015-02-04 20:41:40 +0100 |
commit | 9f13af8d3c96741e69f50b23abca9bd5a5e19998 (patch) | |
tree | f44c6716dc88cf8edb2db2c1dba370582c1e5eb8 /searx/engines/yahoo.py | |
parent | ff2ad57a8781c72886848abf013ec84778807c97 (diff) | |
download | searxng-9f13af8d3c96741e69f50b23abca9bd5a5e19998.tar.gz searxng-9f13af8d3c96741e69f50b23abca9bd5a5e19998.zip |
Yahoo's unit test
Diffstat (limited to 'searx/engines/yahoo.py')
-rw-r--r-- | searx/engines/yahoo.py | 4 |
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 |