瀏覽代碼

[vimeo] extract m3u8 manifest and bitrate

remitamine 10 年之前
父節點
當前提交
f4076bb736
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      youtube_dl/extractor/vimeo.py

+ 4 - 0
youtube_dl/extractor/vimeo.py

@@ -397,8 +397,12 @@ class VimeoIE(VimeoBaseInfoExtractor):
                     'format_id': format_id,
                     'format_id': format_id,
                     'width': file_info.get('width'),
                     'width': file_info.get('width'),
                     'height': file_info.get('height'),
                     'height': file_info.get('height'),
+                    'tbr': file_info.get('bitrate'),
                 })
                 })
         formats = []
         formats = []
+        hls = config_files.get("hls")
+        if hls:
+            formats = self._extract_m3u8_formats(hls['all'], video_id, m3u8_id='hls')
         for key in ('other', 'sd', 'hd'):
         for key in ('other', 'sd', 'hd'):
             formats += files[key]
             formats += files[key]
         if len(formats) == 0:
         if len(formats) == 0: