1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-11 01:17:15 +08:00

[atresplayer] Fixed format sorting

This commit is contained in:
zurfyx 2017-12-24 13:34:50 +01:00
parent 79826a5ed9
commit d888212acc
No known key found for this signature in database
GPG Key ID: B7457DFB0A3A9BEE

View File

@ -132,9 +132,11 @@ class AtresPlayerIE(InfoExtractor):
'url': video_url,
'format_id': 'http',
}
mobj = re.search(r'(?P<bitrate>\d+)K_(?P<width>\d+)x(?P<height>\d+)', video_url)
mobj = re.search(r'(?P<bitrate>\d+)K_(?P<width>\d+)x(?P<height>\d+)', video_url)\
or re.search(r'video_(?P<width>\d+)(x(?P<height>\d+))?_(?P<bitrate>\d+)', video_url)
if mobj:
format_info.update({
'preference': -40,
'width': int_or_none(mobj.group('width')),
'height': int_or_none(mobj.group('height')),
'tbr': int_or_none(mobj.group('bitrate')),