diff options
author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-12-16 17:26:16 +0100 |
---|---|---|
committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2014-12-16 17:26:16 +0100 |
commit | a508d540ac43196edeb4d946dfdf64a1d0a438ed (patch) | |
tree | 7d2b5101dfa91c3d2a81467a1bf58bba26be6362 /searx/engines/yahoo.py | |
parent | 91f9973227e003604e036278e42a4c6394bf5478 (diff) | |
download | searxng-a508d540ac43196edeb4d946dfdf64a1d0a438ed.tar.gz searxng-a508d540ac43196edeb4d946dfdf64a1d0a438ed.zip |
[fix] pep8
Diffstat (limited to 'searx/engines/yahoo.py')
-rw-r--r-- | searx/engines/yahoo.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/searx/engines/yahoo.py b/searx/engines/yahoo.py index 938540ece..c6c5b0d0d 100644 --- a/searx/engines/yahoo.py +++ b/searx/engines/yahoo.py @@ -20,7 +20,8 @@ paging = True language_support = True # search-url -search_url = 'https://search.yahoo.com/search?{query}&b={offset}&fl=1&vl=lang_{lang}' +base_url = 'https://search.yahoo.com/' +search_url = 'search?{query}&b={offset}&fl=1&vl=lang_{lang}' # specific xpath variables results_xpath = '//div[@class="res"]' @@ -57,9 +58,9 @@ def request(query, params): else: language = params['language'].split('_')[0] - params['url'] = search_url.format(offset=offset, - query=urlencode({'p': query}), - lang=language) + params['url'] = base_url + search_url.format(offset=offset, + query=urlencode({'p': query}), + lang=language) # TODO required? params['cookies']['sB'] = 'fl=1&vl=lang_{lang}&sh=1&rw=new&v=1'\ |