mirror of
				https://github.com/searxng/searxng.git
				synced 2025-11-03 19:17:07 -05:00 
			
		
		
		
	[fix] google_videos engine: some results don't a thumbnail
This commit is contained in:
		
							parent
							
								
									d44677e226
								
							
						
					
					
						commit
						8b7ac56669
					
				@ -75,8 +75,10 @@ def response(resp):
 | 
			
		||||
 | 
			
		||||
        # get thumbnails
 | 
			
		||||
        script = str(dom.xpath('//script[contains(., "_setImagesSrc")]')[0].text)
 | 
			
		||||
        id = result.xpath('.//div[@class="s"]//img/@id')[0]
 | 
			
		||||
        thumbnails_data = re.findall('s=\'(.*?)(?:\\\\[a-z,1-9,\\\\]+\'|\')\;var ii=\[(?:|[\'vidthumb\d+\',]+)\'' + id,
 | 
			
		||||
        ids = result.xpath('.//div[@class="s"]//img/@id')
 | 
			
		||||
        if len(ids) > 0:
 | 
			
		||||
            thumbnails_data = \
 | 
			
		||||
                re.findall('s=\'(.*?)(?:\\\\[a-z,1-9,\\\\]+\'|\')\;var ii=\[(?:|[\'vidthumb\d+\',]+)\'' + ids[0],
 | 
			
		||||
                           script)
 | 
			
		||||
            tmp = []
 | 
			
		||||
            if len(thumbnails_data) != 0:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user