[youtube] Use the existing `w` and `h` variables
authorLukáš Lalinský <lukas@oxygene.sk>
Sat, 28 Nov 2015 07:16:46 +0000 (08:16 +0100)
committerLukáš Lalinský <lukas@oxygene.sk>
Sat, 28 Nov 2015 07:16:46 +0000 (08:16 +0100)
youtube_dl/extractor/youtube.py

index 726b5ba0aa009ab5a8f871cb8d37deebc1b5d651..9da8d4bc532e006d263c77b14a004289b635adaa 100644 (file)
@@ -1515,7 +1515,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
             w = float(stretched_m.group('w'))
             h = float(stretched_m.group('h'))
             if w > 0 and h > 0:
-                ratio = float(stretched_m.group('w')) / float(stretched_m.group('h'))
+                ratio = w / h
                 for f in formats:
                     if f.get('vcodec') != 'none':
                         f['stretched_ratio'] = ratio