mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 13:49:26 +02:00
[fix] pep8
This commit is contained in:
parent
91f9973227
commit
a508d540ac
6 changed files with 35 additions and 17 deletions
|
@ -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'\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue