ソースを参照

[rutv] fix vbr for empty string value (#30623)

* [rutv] use str_to_int() (thx dirkf)
Vladimir Stavrinov 3 年 前
コミット
3472227074
1 ファイル変更3 行追加2 行削除
  1. 3 2
      youtube_dl/extractor/rutv.py

+ 3 - 2
youtube_dl/extractor/rutv.py

@@ -6,7 +6,8 @@ import re
 from .common import InfoExtractor
 from ..utils import (
     ExtractorError,
-    int_or_none
+    int_or_none,
+    str_to_int
 )
 
 
@@ -179,7 +180,7 @@ class RUTVIE(InfoExtractor):
                         'player_url': 'http://player.rutv.ru/flash3v/osmf.swf?i=22',
                         'rtmp_live': True,
                         'ext': 'flv',
-                        'vbr': int(quality),
+                        'vbr': str_to_int(quality),
                         'preference': preference,
                     }
                 elif transport == 'm3u8':