Speed up a little html encoding detection
Not sure this is a smart move
This commit is contained in:
		
							
								
								
									
										2
									
								
								morss.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								morss.py
									
									
									
									
									
								
							@@ -308,7 +308,7 @@ def detEncoding(data, con=None):
 | 
				
			|||||||
		log('header')
 | 
							log('header')
 | 
				
			||||||
		return con.headers.getparam('charset')
 | 
							return con.headers.getparam('charset')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	match = re.search('charset=["\']?([0-9a-zA-Z-]+)', data)
 | 
						match = re.search('charset=["\']?([0-9a-zA-Z-]+)', data[:1000])
 | 
				
			||||||
	if match:
 | 
						if match:
 | 
				
			||||||
		log('meta.re')
 | 
							log('meta.re')
 | 
				
			||||||
		return match.groups()[0]
 | 
							return match.groups()[0]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user