mirror of
				https://github.com/searxng/searxng.git
				synced 2025-10-30 18:22:31 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			400 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			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': ''}]
 | |
| 
 |