Parcourir la source

Fix ruutu extractor bug

If there's no resolution attribute in xml, only width gets a
value, height doesn't and ValueError is raised.
fluks il y a 10 ans
Parent
commit
0facd2af3e
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      youtube_dl/extractor/ruutu.py

+ 1 - 1
youtube_dl/extractor/ruutu.py

@@ -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,