1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-04 13:03:19 +08:00

Fix ruutu extractor bug

If there's no resolution attribute in xml, only width gets a
value, height doesn't and ValueError is raised.
This commit is contained in:
fluks 2015-10-02 04:08:13 +03:00
parent 06c6efa970
commit 6d2066498c

View File

@ -74,7 +74,7 @@ class RuutuIE(InfoExtractor):
preference = -1 if proto == 'rtmp' else 1
label = child.get('label')
tbr = int_or_none(child.get('bitrate'))
width, height = [int_or_none(x) for x in child.get('resolution', '').split('x')]
width, height = [int_or_none(x) for x in child.get('resolution', 'x').split('x')]
formats.append({
'format_id': '%s-%s' % (proto, label if label else tbr),
'url': video_url,