mirror of
https://github.com/searxng/searxng.git
synced 2024-11-19 02:40:11 +01:00
[mod] tineye engine: set engine_type to 'online_url_search'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
e92d40c854
commit
a6b879f19c
@ -28,7 +28,8 @@ about = {
|
||||
"results": 'JSON',
|
||||
}
|
||||
|
||||
categories = ['images']
|
||||
engine_type = 'online_url_search'
|
||||
categories = ['general']
|
||||
paging = True
|
||||
safesearch = False
|
||||
base_url = 'https://tineye.com'
|
||||
@ -36,8 +37,16 @@ search_string = '/result_json/?page={page}&{query}'
|
||||
|
||||
|
||||
def request(query, params):
|
||||
|
||||
if params['search_urls']['data:image']:
|
||||
query = params['search_urls']['data:image']
|
||||
elif params['search_urls']['http']:
|
||||
query = params['search_urls']['http']
|
||||
|
||||
query = urlencode({'url': query})
|
||||
|
||||
# see https://github.com/TinEye/pytineye/blob/main/pytineye/api.py
|
||||
params['url'] = base_url + search_string.format(query=urlencode({'url': query}), page=params['pageno'])
|
||||
params['url'] = base_url + search_string.format(query=query, page=params['pageno'])
|
||||
|
||||
params['headers'].update(
|
||||
{
|
||||
|
@ -487,7 +487,7 @@ engines:
|
||||
engine: tineye
|
||||
shortcut: tin
|
||||
timeout: 9.0
|
||||
disabled: true
|
||||
disabled: false
|
||||
|
||||
- name: etymonline
|
||||
engine: xpath
|
||||
|
Loading…
Reference in New Issue
Block a user