From 41f24c321d04108a32f457d5d5445f2cfce705a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sat, 28 Nov 2015 08:16:46 +0100 Subject: [PATCH] [youtube] Use the existing `w` and `h` variables --- youtube_dl/extractor/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 726b5ba0a..9da8d4bc5 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -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