]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/udemy.py
[compat] Remove more functions
[yt-dlp.git] / yt_dlp / extractor / udemy.py
index 94ea2fe590bb26649b32d74ac95040fd432eb643..1dc2dbdc46d8143e02f79be2ba9ff71918637d51 100644 (file)
@@ -1,16 +1,12 @@
 import re
+import urllib.request
 
 from .common import InfoExtractor
-from ..compat import (
-    compat_HTTPError,
-    compat_str,
-    compat_urllib_request,
-    compat_urlparse,
-)
+from ..compat import compat_HTTPError, compat_str, compat_urlparse
 from ..utils import (
+    ExtractorError,
     determine_ext,
     extract_attributes,
-    ExtractorError,
     float_or_none,
     int_or_none,
     js_to_json,
@@ -155,7 +151,7 @@ def _download_json(self, url_or_request, *args, **kwargs):
                 headers['X-Udemy-Bearer-Token'] = cookie.value
                 headers['X-Udemy-Authorization'] = 'Bearer %s' % cookie.value
 
-        if isinstance(url_or_request, compat_urllib_request.Request):
+        if isinstance(url_or_request, urllib.request.Request):
             for header, value in headers.items():
                 url_or_request.add_header(header, value)
         else: