]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Fix ruutu extractor bug
authorfluks <fluks.github@gmail.com>
Fri, 2 Oct 2015 01:08:13 +0000 (04:08 +0300)
committerSergey M․ <dstftw@gmail.com>
Fri, 2 Oct 2015 14:48:14 +0000 (20:48 +0600)
If there's no resolution attribute in xml, only width gets a
value, height doesn't and ValueError is raised.

youtube_dl/extractor/ruutu.py

index c67ad25ce510c888566748cffc7cb2639e4e7fe0..7720f138336deb13b1651726f88185bfbb3850f6 100644 (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,