summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-02-19 20:14:31 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2022-02-21 22:12:07 +0100
commitb08b81b4349b64b2b42f0a52a2c7f76073d4ffc3 (patch)
treee740b9b1e7c023b2cb88a6abffbca79fffa15a2d /searx/engines
parentbded1ee280a8e6a60ba7ecc2728117c7f824412f (diff)
downloadsearxng-b08b81b4349b64b2b42f0a52a2c7f76073d4ffc3.tar.gz
searxng-b08b81b4349b64b2b42f0a52a2c7f76073d4ffc3.zip
[mod] bandcamp & genius: in result set img_src instead thumbnail
Suggested-by: @dalf https://github.com/searxng/searxng/pull/900#issuecomment-1046009057 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/bandcamp.py2
-rw-r--r--searx/engines/genius.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/searx/engines/bandcamp.py b/searx/engines/bandcamp.py
index f83ca6d4f..8feff1fe0 100644
--- a/searx/engines/bandcamp.py
+++ b/searx/engines/bandcamp.py
@@ -82,7 +82,7 @@ def response(resp):
thumbnail = result.xpath('.//div[@class="art"]/img/@src')
if thumbnail:
- new_result['thumbnail'] = thumbnail[0]
+ new_result['img_src'] = thumbnail[0]
result_id = parse_qs(urlparse(link.get('href')).query)["search_item_id"][0]
itemtype = extract_text(result.xpath('.//div[@class="itemtype"]')).lower()
diff --git a/searx/engines/genius.py b/searx/engines/genius.py
index 2cdc686a7..db1f66603 100644
--- a/searx/engines/genius.py
+++ b/searx/engines/genius.py
@@ -51,7 +51,7 @@ def parse_lyric(hit):
'url': hit['result']['url'],
'title': hit['result']['full_title'],
'content': content,
- 'thumbnail': hit['result']['song_art_image_thumbnail_url'],
+ 'img_src': hit['result']['song_art_image_thumbnail_url'],
}
if timestamp:
result.update({'publishedDate': datetime.fromtimestamp(timestamp)})
@@ -69,7 +69,7 @@ def parse_artist(hit):
'url': hit['result']['url'],
'title': hit['result']['name'],
'content': '',
- 'thumbnail': hit['result']['image_url'],
+ 'img_src': hit['result']['image_url'],
}
return result
@@ -85,7 +85,7 @@ def parse_album(hit):
return {
'url': res['url'],
'title': res['full_title'],
- 'thumbnail': res['cover_art_url'],
+ 'img_src': res['cover_art_url'],
'content': content.strip(),
}