mirror of
				https://github.com/Mikaela/Limnoria.git
				synced 2025-10-31 15:47:25 +01:00 
			
		
		
		
	Proxy for Google.
This commit is contained in:
		
							parent
							
								
									0533feafe9
								
							
						
					
					
						commit
						b6a03d9ac1
					
				| @ -95,8 +95,6 @@ totalSearches = 0 | ||||
| totalTime = 0 | ||||
| last24hours = structures.queue() | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| def search(log, queries, **kwargs): | ||||
|     assert not isinstance(queries, basestring), 'Old code: queries is a list.' | ||||
|     try: | ||||
| @ -104,6 +102,9 @@ def search(log, queries, **kwargs): | ||||
|         for (i, query) in enumerate(queries): | ||||
|             if len(query.split(None, 1)) > 1: | ||||
|                 queries[i] = repr(query) | ||||
|         proxy = conf.supybot.protocols.http.proxy() | ||||
|         if proxy: | ||||
|             kwargs['http_proxy'] = proxy | ||||
|         data = google.doGoogleSearch(' '.join(queries), **kwargs) | ||||
|         now = time.time() | ||||
|         totalSearches += 1 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jeremy Fincher
						Jeremy Fincher