mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	[pylint] Reddit engine
Add Reddit engine to pylint process Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
		
							parent
							
								
									2713ac6c0b
								
							
						
					
					
						commit
						2af50c2588
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -1,6 +1,6 @@ | |||
| # SPDX-License-Identifier: AGPL-3.0-or-later | ||||
| """ | ||||
|  Reddit | ||||
| # lint: pylint | ||||
| """Reddit | ||||
| """ | ||||
| 
 | ||||
| import json | ||||
|  | @ -26,16 +26,16 @@ base_url = 'https://www.reddit.com/' | |||
| search_url = base_url + 'search.json?{query}' | ||||
| 
 | ||||
| 
 | ||||
| # do search-request | ||||
| def request(query, params): | ||||
| 
 | ||||
|     query = urlencode({'q': query, 'limit': page_size}) | ||||
|     params['url'] = search_url.format(query=query) | ||||
| 
 | ||||
|     return params | ||||
| 
 | ||||
| 
 | ||||
| # get response from search-request | ||||
| def response(resp): | ||||
| 
 | ||||
|     img_results = [] | ||||
|     text_results = [] | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Markus Heiser
						Markus Heiser