소스 검색

[youtube] Clarify rationale for yt:stretch validation

Sergey M․ 9 년 전
부모
커밋
5faf9fed7e
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      youtube_dl/extractor/youtube.py

+ 2 - 0
youtube_dl/extractor/youtube.py

@@ -1514,6 +1514,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
         if stretched_m:
             w = float(stretched_m.group('w'))
             h = float(stretched_m.group('h'))
+            # yt:stretch may hold invalid ratio data (e.g. for Q39EVAstoRM ratio is 17:0).
+            # We will only process correct ratios.
             if w > 0 and h > 0:
                 ratio = w / h
                 for f in formats: