mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 18:22:21 +00:00
[viewster] Extract height from bitrate and prefer mp4 videos
This commit is contained in:
parent
92085e7099
commit
8e97596b7b
1 changed files with 9 additions and 2 deletions
|
@ -120,11 +120,18 @@ class ViewsterIE(InfoExtractor):
|
||||||
fatal=False # m3u8 sometimes fail
|
fatal=False # m3u8 sometimes fail
|
||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
formats.append({
|
format_id = media.get('Bitrate')
|
||||||
|
f = {
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
|
'format_id': 'mp4-%s' % format_id,
|
||||||
'height': int_or_none(media.get('Height')),
|
'height': int_or_none(media.get('Height')),
|
||||||
'width': int_or_none(media.get('Width')),
|
'width': int_or_none(media.get('Width')),
|
||||||
})
|
'preference': 1,
|
||||||
|
}
|
||||||
|
if format_id and not f['height']:
|
||||||
|
f['height'] = int_or_none(self._search_regex(
|
||||||
|
r'^(\d+)[pP]$', format_id, 'height', default=None))
|
||||||
|
formats.append(f)
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
synopsis = info.get('Synopsis', {})
|
synopsis = info.get('Synopsis', {})
|
||||||
|
|
Loading…
Reference in a new issue