diff options
author | remitamine <remitamine@gmail.com> | 2015-10-10 21:05:29 +0100 |
---|---|---|
committer | remitamine <remitamine@gmail.com> | 2015-10-10 21:05:29 +0100 |
commit | 35a3ff1d337edd527c73db133d87ed23ca4469f5 (patch) | |
tree | 673f8e025ce075f1cc1dc64b08e5879c63269605 /youtube_dl/extractor/vimeo.py | |
parent | fff496c689e44ac96909cf55c9ae746fb6b14e07 (diff) |
[vimeo] always convert width, height and bitrate to int
Diffstat (limited to 'youtube_dl/extractor/vimeo.py')
-rw-r--r-- | youtube_dl/extractor/vimeo.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index 2051ac9de..97590d220 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -395,14 +395,14 @@ class VimeoIE(VimeoBaseInfoExtractor): 'ext': codec_extension, 'url': video_url, 'format_id': format_id, - 'width': file_info.get('width'), - 'height': file_info.get('height'), - 'tbr': file_info.get('bitrate'), + 'width': int_or_none(file_info.get('width')), + 'height': int_or_none(file_info.get('height')), + 'tbr': int_or_none(file_info.get('bitrate')), }) formats = [] - hls = config_files.get("hls") - if hls: - formats = self._extract_m3u8_formats(hls['all'], video_id, 'mp4', 'm3u8_native', 0, 'hls', fatal=False) + m3u8_url = config_files.get('hls', {}).get('all') + if m3u8_url: + formats = self._extract_m3u8_formats(m3u8_url, video_id, 'mp4', 'm3u8_native', 0, 'hls', fatal=False) for key in ('other', 'sd', 'hd'): formats += files[key] self._sort_formats(formats) |