mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 09:17:07 -05:00 
			
		
		
		
	Fix exception with n_views<1000
This commit is contained in:
		@@ -35,7 +35,11 @@ class VpornIE(InfoExtractor):
 | 
				
			|||||||
        duration = int(mobj.group('minutes')) * 60 + int(mobj.group('seconds')) if mobj else None
 | 
					        duration = int(mobj.group('minutes')) * 60 + int(mobj.group('seconds')) if mobj else None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        mobj = re.search(r'<span>((?P<thousands>\d+),)?(?P<units>\d+) VIEWS</span>', webpage)
 | 
					        mobj = re.search(r'<span>((?P<thousands>\d+),)?(?P<units>\d+) VIEWS</span>', webpage)
 | 
				
			||||||
        view_count = int(mobj.group('thousands')) * 1000 + int(mobj.group('units')) if mobj else None
 | 
					        try:
 | 
				
			||||||
 | 
					            view_count = int(mobj.group('units'))
 | 
				
			||||||
 | 
					            view_count += int(mobj.group('thousands')) * 1000
 | 
				
			||||||
 | 
					        except:
 | 
				
			||||||
 | 
					            pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            'id': video_id,
 | 
					            'id': video_id,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user