mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	[fix] unicode urls
This commit is contained in:
		
							parent
							
								
									596c6b6c93
								
							
						
					
					
						commit
						3144ec1d59
					
				
					 2 changed files with 3 additions and 8 deletions
				
			
		|  | @ -13,11 +13,10 @@ import re | |||
| from urlparse import urljoin | ||||
| from lxml import html | ||||
| from cgi import escape | ||||
| from searx.engines.xpath import extract_text | ||||
| from searx.utils import is_valid_lang | ||||
| 
 | ||||
| categories = ['general'] | ||||
| url = 'http://dictzone.com/{from_lang}-{to_lang}-dictionary/{query}' | ||||
| url = u'http://dictzone.com/{from_lang}-{to_lang}-dictionary/{query}' | ||||
| weight = 100 | ||||
| 
 | ||||
| parser_re = re.compile(u'.*?([a-z]+)-([a-z]+) ([^ ]+)$', re.I) | ||||
|  |  | |||
|  | @ -9,16 +9,12 @@ | |||
|  @parse       url, title, content | ||||
| """ | ||||
| import re | ||||
| from urlparse import urljoin | ||||
| from lxml import html | ||||
| from cgi import escape | ||||
| from searx.engines.xpath import extract_text | ||||
| from searx.utils import is_valid_lang | ||||
| 
 | ||||
| categories = ['general'] | ||||
| url = 'http://api.mymemory.translated.net/get?q={query}' \ | ||||
|       '&langpair={from_lang}|{to_lang}{key}' | ||||
| web_url = 'http://mymemory.translated.net/en/{from_lang}/{to_lang}/{query}' | ||||
| url = u'http://api.mymemory.translated.net/get?q={query}&langpair={from_lang}|{to_lang}{key}' | ||||
| web_url = u'http://mymemory.translated.net/en/{from_lang}/{to_lang}/{query}' | ||||
| weight = 100 | ||||
| 
 | ||||
| parser_re = re.compile(u'.*?([a-z]+)-([a-z]+) (.{2,})$', re.I) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Adam Tauber
						Adam Tauber