summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-03-08 18:22:31 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-03-09 08:15:50 +0100
commita7b51f023eae6d13684a7209f1ac4d4477381562 (patch)
treec17ed843bb361ea25ed9225a05cbdedb0641533f /searx/engines
parent48d04871a4bc37946ebd0a028944ca6283ba820f (diff)
downloadsearxng-a7b51f023eae6d13684a7209f1ac4d4477381562.tar.gz
searxng-a7b51f023eae6d13684a7209f1ac4d4477381562.zip
[black] upgrade black 22.12.0 --> 24.2.0
The issue discussed in [1] has been solved since [2] has been merged into black / now we can upgrade without touching 69 files as it was needed with black 23.1.0 [3]. [1] https://github.com/searxng/searxng/pull/2159#issuecomment-1425723977 [2] https://github.com/psf/black/pull/4060 [3] https://github.com/searxng/searxng/pull/2159/files Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/deezer.py1
-rw-r--r--searx/engines/freesound.py1
-rw-r--r--searx/engines/gentoo.py1
-rw-r--r--searx/engines/pdbe.py4
-rw-r--r--searx/engines/sjp.py2
-rw-r--r--searx/engines/spotify.py1
-rw-r--r--searx/engines/yandex_music.py1
7 files changed, 8 insertions, 3 deletions
diff --git a/searx/engines/deezer.py b/searx/engines/deezer.py
index 63c71e3cc..3dd787c48 100644
--- a/searx/engines/deezer.py
+++ b/searx/engines/deezer.py
@@ -25,6 +25,7 @@ url = 'https://api.deezer.com/'
search_url = url + 'search?{query}&index={offset}'
iframe_src = "https://www.deezer.com/plugins/player?type=tracks&id={audioid}"
+
# do search-request
def request(query, params):
offset = (params['pageno'] - 1) * 25
diff --git a/searx/engines/freesound.py b/searx/engines/freesound.py
index ea6666621..b56b5a414 100644
--- a/searx/engines/freesound.py
+++ b/searx/engines/freesound.py
@@ -29,6 +29,7 @@ search_url = (
url + "search/text/?query={query}&page={page}&fields=name,url,download,created,description,type&token={api_key}"
)
+
# search request
def request(query, params):
params["url"] = search_url.format(
diff --git a/searx/engines/gentoo.py b/searx/engines/gentoo.py
index f0cb6a794..cf193c2a3 100644
--- a/searx/engines/gentoo.py
+++ b/searx/engines/gentoo.py
@@ -79,6 +79,7 @@ main_langs = {
'zh': '简体中文',
}
+
# do search-request
def request(query, params):
# translate the locale (e.g. 'en-US') to language code ('en')
diff --git a/searx/engines/pdbe.py b/searx/engines/pdbe.py
index 34c8d3227..a0526057d 100644
--- a/searx/engines/pdbe.py
+++ b/searx/engines/pdbe.py
@@ -66,14 +66,14 @@ def construct_body(result):
year=result['release_year'],
)
img_src = pdbe_preview_url.format(pdb_id=result['pdb_id'])
- except (KeyError):
+ except KeyError:
content = None
img_src = None
# construct url for preview image
try:
img_src = pdbe_preview_url.format(pdb_id=result['pdb_id'])
- except (KeyError):
+ except KeyError:
img_src = None
return [title, content, img_src]
diff --git a/searx/engines/sjp.py b/searx/engines/sjp.py
index 6daa46e78..711fed736 100644
--- a/searx/engines/sjp.py
+++ b/searx/engines/sjp.py
@@ -80,7 +80,7 @@ def response(resp):
for src in definitions:
infobox += f"<div><small>{src[0]}</small>"
infobox += "<ul>"
- for (def_text, sub_def) in src[1]:
+ for def_text, sub_def in src[1]:
infobox += f"<li>{def_text}</li>"
if sub_def:
infobox += "<ol>"
diff --git a/searx/engines/spotify.py b/searx/engines/spotify.py
index 87edb7f1b..491a7058e 100644
--- a/searx/engines/spotify.py
+++ b/searx/engines/spotify.py
@@ -29,6 +29,7 @@ api_client_secret = None
url = 'https://api.spotify.com/'
search_url = url + 'v1/search?{query}&type=track&offset={offset}'
+
# do search-request
def request(query, params):
offset = (params['pageno'] - 1) * 20
diff --git a/searx/engines/yandex_music.py b/searx/engines/yandex_music.py
index b44a5992e..5d6fe6bb1 100644
--- a/searx/engines/yandex_music.py
+++ b/searx/engines/yandex_music.py
@@ -31,6 +31,7 @@ paging = True
url = 'https://music.yandex.ru'
search_url = url + '/handlers/music-search.jsx'
+
# do search-request
def request(query, params):
args = {'text': query, 'page': params['pageno'] - 1}