]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/bigflix.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / bigflix.py
index 02d1ba0e3f64ec0811b0a0ce818206a66679f764..9c55bb9682ef31cf2685079462b9df600a696c74 100644 (file)
@@ -1,10 +1,8 @@
+import base64
 import re
+import urllib.parse
 
 from .common import InfoExtractor
-from ..compat import (
-    compat_b64decode,
-    compat_urllib_parse_unquote,
-)
 
 
 class BigflixIE(InfoExtractor):
@@ -21,7 +19,7 @@ class BigflixIE(InfoExtractor):
         },
         'params': {
             'skip_download': True,
-        }
+        },
     }, {
         # multiple formats
         'url': 'http://www.bigflix.com/Malayalam-movies/Drama-movies/Indian-Rupee/15967',
@@ -38,7 +36,7 @@ def _real_extract(self, url):
             webpage, 'title')
 
         def decode_url(quoted_b64_url):
-            return compat_b64decode(compat_urllib_parse_unquote(
+            return base64.b64decode(urllib.parse.unquote(
                 quoted_b64_url)).decode('utf-8')
 
         formats = []
@@ -47,7 +45,7 @@ def decode_url(quoted_b64_url):
             video_url = decode_url(encoded_url)
             f = {
                 'url': video_url,
-                'format_id': '%sp' % height,
+                'format_id': f'{height}p',
                 'height': int(height),
             }
             if video_url.startswith('rtmp'):
@@ -69,5 +67,5 @@ def decode_url(quoted_b64_url):
             'id': video_id,
             'title': title,
             'description': description,
-            'formats': formats
+            'formats': formats,
         }