]> jfr.im git - yt-dlp.git/blobdiff - test/test_youtube_signature.py
[cleanup] Mark some compat variables for removal (#2173)
[yt-dlp.git] / test / test_youtube_signature.py
index bbbba073f80ca456f766f161026e0c1ddb3a7d5f..6412acce046697bf59e5bfe07048c0b41344eb77 100644 (file)
 import io
 import re
 import string
+import urllib.request
 
 from test.helper import FakeYDL, is_download_test
 from yt_dlp.extractor import YoutubeIE
 from yt_dlp.jsinterp import JSInterpreter
-from yt_dlp.compat import compat_str, compat_urlretrieve
+from yt_dlp.compat import compat_str
 
 _SIG_TESTS = [
     (
@@ -147,7 +148,7 @@ def test_func(self):
             fn = os.path.join(self.TESTDATA_DIR, basename)
 
             if not os.path.exists(fn):
-                compat_urlretrieve(url, fn)
+                urllib.request.urlretrieve(url, fn)
             with io.open(fn, encoding='utf-8') as testf:
                 jscode = testf.read()
             self.assertEqual(sig_func(jscode, sig_input), expected_sig)