mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
[fix] pep8 : engines (errors E121, E127, E128 and E501 still exist)
This commit is contained in:
parent
ffcec383b7
commit
7c13d630e4
22 changed files with 109 additions and 97 deletions
|
@ -1,15 +1,17 @@
|
|||
## DuckDuckGo (Web)
|
||||
#
|
||||
#
|
||||
# @website https://duckduckgo.com/
|
||||
# @provide-api yes (https://duckduckgo.com/api), but not all results from search-site
|
||||
#
|
||||
# @provide-api yes (https://duckduckgo.com/api),
|
||||
# but not all results from search-site
|
||||
#
|
||||
# @using-api no
|
||||
# @results HTML (using search portal)
|
||||
# @stable no (HTML can change)
|
||||
# @parse url, title, content
|
||||
#
|
||||
# @todo rewrite to api
|
||||
# @todo language support (the current used site does not support language-change)
|
||||
# @todo language support
|
||||
# (the current used site does not support language-change)
|
||||
|
||||
from urllib import urlencode
|
||||
from lxml.html import fromstring
|
||||
|
@ -37,7 +39,7 @@ def request(query, params):
|
|||
if params['language'] == 'all':
|
||||
locale = 'en-us'
|
||||
else:
|
||||
locale = params['language'].replace('_','-').lower()
|
||||
locale = params['language'].replace('_', '-').lower()
|
||||
|
||||
params['url'] = url.format(
|
||||
query=urlencode({'q': query, 'kl': locale}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue