]> jfr.im git - yt-dlp.git/blobdiff - devscripts/update-formulae.py
[compat] Remove more functions
[yt-dlp.git] / devscripts / update-formulae.py
index a89872c7b948816feded69ddbb5074cc65a40dff..02b869304bde729ccdb07b8535a171e2dac60978 100644 (file)
@@ -1,12 +1,15 @@
 #!/usr/bin/env python3
-import json
+
+# Allow direct execution
 import os
-import re
 import sys
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 
-from yt_dlp.compat import compat_urllib_request
+
+import json
+import re
+import urllib.request
 
 # usage: python3 ./devscripts/update-formulae.py <path-to-formulae-rb> <version>
 # version can be either 0-aligned (yt-dlp version) or normalized (PyPl version)
@@ -15,7 +18,7 @@
 
 normalized_version = '.'.join(str(int(x)) for x in version.split('.'))
 
-pypi_release = json.loads(compat_urllib_request.urlopen(
+pypi_release = json.loads(urllib.request.urlopen(
     'https://pypi.org/pypi/yt-dlp/%s/json' % normalized_version
 ).read().decode())