mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 09:17:07 -05:00 
			
		
		
		
	[aparat] Fix extraction
This commit is contained in:
		@@ -34,17 +34,18 @@ class AparatIE(InfoExtractor):
 | 
			
		||||
            'http://www.aparat.com/video/video/embed/vt/frame/showvideo/yes/videohash/' + video_id,
 | 
			
		||||
            video_id)
 | 
			
		||||
 | 
			
		||||
        title = self._search_regex(r'\s+title:\s*"([^"]+)"', webpage, 'title')
 | 
			
		||||
 | 
			
		||||
        file_list = self._parse_json(
 | 
			
		||||
            self._search_regex(
 | 
			
		||||
                r'fileList\s*=\s*JSON\.parse\(\'([^\']+)\'\)', webpage,
 | 
			
		||||
                r'var options\s*=\s*JSON\.parse\(\'([^\']+)\'\)', webpage,
 | 
			
		||||
                'file list'),
 | 
			
		||||
            video_id)
 | 
			
		||||
 | 
			
		||||
        title = file_list['plugins']['sabaPlayerPlugin']['title']
 | 
			
		||||
 | 
			
		||||
        formats = []
 | 
			
		||||
        for item in file_list[0]:
 | 
			
		||||
            file_url = url_or_none(item.get('file'))
 | 
			
		||||
        for list in file_list['plugins']['sabaPlayerPlugin']['multiSRC']:
 | 
			
		||||
            for item in list:
 | 
			
		||||
                file_url = url_or_none(item.get('src'))
 | 
			
		||||
                if not file_url:
 | 
			
		||||
                    continue
 | 
			
		||||
                ext = mimetype2ext(item.get('type'))
 | 
			
		||||
@@ -58,8 +59,7 @@ class AparatIE(InfoExtractor):
 | 
			
		||||
                })
 | 
			
		||||
        self._sort_formats(formats)
 | 
			
		||||
 | 
			
		||||
        thumbnail = self._search_regex(
 | 
			
		||||
            r'image:\s*"([^"]+)"', webpage, 'thumbnail', fatal=False)
 | 
			
		||||
        thumbnail = file_list['poster']
 | 
			
		||||
 | 
			
		||||
        return {
 | 
			
		||||
            'id': video_id,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user