1
0
mirror of https://github.com/searx/searx synced 2024-11-27 04:12:25 +01:00
searx/examples/basic_engine.py
2013-10-15 19:11:43 +02:00

22 lines
400 B
Python

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': ''}]