[rutv] fix vbr for empty string value (#30623)
authorVladimir Stavrinov <9163352+vstavrinov@users.noreply.github.com>
Mon, 14 Feb 2022 17:54:31 +0000 (20:54 +0300)
committerGitHub <noreply@github.com>
Mon, 14 Feb 2022 17:54:31 +0000 (17:54 +0000)
* [rutv] use str_to_int() (thx dirkf)

youtube_dl/extractor/rutv.py

index d2713c19a053cba19448ad772525157144b19efa..05f3193968c68ddbc8104d22099dd7a83ebe9018 100644 (file)
@@ -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':