]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/vuclip.py
[cleanup] Add more ruff rules (#10149)
[yt-dlp.git] / yt_dlp / extractor / vuclip.py
index 0e562983d018cd83112a07cd491e5b6f9164e427..ad7eab351e3bda9f7a00c5b2c2eb49c81f82adc8 100644 (file)
@@ -1,9 +1,7 @@
 import re
+import urllib.parse
 
 from .common import InfoExtractor
-from ..compat import (
-    compat_urllib_parse_urlparse,
-)
 from ..utils import (
     ExtractorError,
     parse_duration,
@@ -21,7 +19,7 @@ class VuClipIE(InfoExtractor):
             'ext': '3gp',
             'title': 'Top 10 TV Convicts',
             'duration': 733,
-        }
+        },
     }
 
     def _real_extract(self, url):
@@ -31,7 +29,7 @@ def _real_extract(self, url):
         ad_m = re.search(
             r'''value="No.*?" onClick="location.href='([^"']+)'"''', webpage)
         if ad_m:
-            urlr = compat_urllib_parse_urlparse(url)
+            urlr = urllib.parse.urlparse(url)
             adfree_url = urlr.scheme + '://' + urlr.netloc + ad_m.group(1)
             webpage = self._download_webpage(
                 adfree_url, video_id, note='Download post-ad page')
@@ -41,7 +39,7 @@ def _real_extract(self, url):
             default=None)
         if error_msg:
             raise ExtractorError(
-                '%s said: %s' % (self.IE_NAME, error_msg), expected=True)
+                f'{self.IE_NAME} said: {error_msg}', expected=True)
 
         # These clowns alternate between two page types
         video_url = self._search_regex(