mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 01:36:29 +00:00
[fix] ccengine engine - avoid unwanted redirects
api.openverse.engineering is a little picky and wants to have a trailing slash in the path: /v1/images? -->/ v1/images/? otherwise it redirects, here is the debug log: DEBUG searx.network.openverse : HTTP Request: GET https://api.openverse.engineering/v1/images?&page=1&page_size=20&format=json&q=foo "HTTP/2 301 Moved Permanently" (text/html; charset=utf-8) DEBUG searx.network.openverse : HTTP Request: GET https://api.openverse.engineering/v1/images/?&page=1&page_size=20&format=json&q=foo "HTTP/2 200 OK" (application/json) WARNING searx.engines.openverse : ErrorContext('searx/search/processors/online.py', 105, 'count_error(', None, '1 redirects, maximum: 0', ('200', 'OK', 'api.openverse.engineering')) True Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
1461d6a07e
commit
4fc5e5299c
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@ categories = ['images']
|
|||
paging = True
|
||||
nb_per_page = 20
|
||||
|
||||
base_url = 'https://api.openverse.engineering/v1/images?'
|
||||
search_string = '&page={page}&page_size={nb_per_page}&format=json&{query}'
|
||||
base_url = 'https://api.openverse.engineering/v1/images/'
|
||||
search_string = '?page={page}&page_size={nb_per_page}&format=json&{query}'
|
||||
|
||||
|
||||
def request(query, params):
|
||||
|
|
Loading…
Reference in a new issue