on 39a2230 help sign in
searx/examples/basic_engine.py
21 lines 400 B history raw
2def request(query, params):
3 '''pre-request callback
4 params<dict>:
5 method : POST/GET
6 headers : {}
7 data : {} # if method == POST
8 url : ''
9 '''
11 params['url'] = 'https://host/%s' % query
13 return params
16def response(resp):
17 '''post-response callback
18 resp: requests response object
19 '''
20 return [{'url': '', 'title': '', 'content': ''}]