mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	[fix] digg cookie characters created in module import
This commit is contained in:
		
							parent
							
								
									a49cc18f9c
								
							
						
					
					
						commit
						6e92fb383a
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -32,6 +32,9 @@ title_xpath = './/h2//a//text()' | |||
| content_xpath = './/p//text()' | ||||
| pubdate_xpath = './/time' | ||||
| 
 | ||||
| digg_cookie_chars = string.ascii_uppercase + string.ascii_lowercase +\ | ||||
|     string.digits + "+_" | ||||
| 
 | ||||
| 
 | ||||
| # do search-request | ||||
| def request(query, params): | ||||
|  | @ -39,9 +42,7 @@ def request(query, params): | |||
|     params['url'] = search_url.format(position=offset, | ||||
|                                       query=quote_plus(query)) | ||||
|     params['cookies']['frontend.auid'] = ''.join(random.choice( | ||||
|         string.ascii_uppercase + | ||||
|         string.ascii_lowercase + | ||||
|         string.digits + "+_") for _ in range(22)) | ||||
|         digg_cookie_chars) for _ in range(22)) | ||||
|     return params | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 misnyo
						misnyo