mirror of
https://github.com/searxng/searxng.git
synced 2024-11-14 16:50:11 +01:00
24 lines
437 B
Python
24 lines
437 B
Python
|
|
categories = ['general'] # optional
|
|
|
|
def request(query, params):
|
|
'''pre-request callback
|
|
params<dict>:
|
|
method : POST/GET
|
|
headers : {}
|
|
data : {} # if method == POST
|
|
url : ''
|
|
'''
|
|
|
|
params['url'] = 'https://host/%s' % query
|
|
|
|
return params
|
|
|
|
|
|
def response(resp):
|
|
'''post-response callback
|
|
resp: requests response object
|
|
'''
|
|
return [{'url': '', 'title': '', 'content': ''}]
|
|
|