@@ -33,20 +33,24 @@ def _real_extract(self, url):
33
33
webpage = self ._download_webpage (url , video_id )
34
34
player_key = self ._search_regex (
35
35
r'<param name="playerKey" value="([^"]+)"' , webpage , 'player key' )
36
- config_url = 'http://client.expotv.com/video/config/%s/%s' % (
37
- video_id , player_key )
38
36
config = self ._download_json (
39
- config_url , video_id ,
40
- note = 'Downloading video configuration' )
37
+ 'http://client.expotv.com/video/config/%s/%s' % (video_id , player_key ),
38
+ video_id ,
39
+ note = 'Downloading video configuration' )
41
40
42
- formats = [{
43
- 'url' : fcfg ['file' ],
44
- 'height' : int_or_none (fcfg .get ('height' )),
45
- 'format_note' : fcfg .get ('label' ),
46
- 'ext' : self ._search_regex (
47
- r'filename=.*\.([a-z0-9_A-Z]+)&' , fcfg ['file' ],
48
- 'file extension' , default = None ),
49
- } for fcfg in config ['sources' ]]
41
+ formats = []
42
+ for fcfg in config ['sources' ]:
43
+ if fcfg ['type' ] == 'm3u8' :
44
+ formats .extend (self ._extract_m3u8_formats (fcfg ['file' ], video_id ))
45
+ else :
46
+ formats .append ({
47
+ 'url' : fcfg ['file' ],
48
+ 'height' : int_or_none (fcfg .get ('height' )),
49
+ 'format_id' : fcfg .get ('label' ),
50
+ 'ext' : self ._search_regex (
51
+ r'filename=.*\.([a-z0-9_A-Z]+)&' , fcfg ['file' ],
52
+ 'file extension' , default = None ),
53
+ })
50
54
self ._sort_formats (formats )
51
55
52
56
title = self ._og_search_title (webpage )
0 commit comments