aboutsummaryrefslogtreecommitdiffstats
path: root/devscripts/update-formulae.py
diff options
context:
space:
mode:
Diffstat (limited to 'devscripts/update-formulae.py')
-rw-r--r--devscripts/update-formulae.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/devscripts/update-formulae.py b/devscripts/update-formulae.py
index a89872c7b..02b869304 100644
--- a/devscripts/update-formulae.py
+++ b/devscripts/update-formulae.py
@@ -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 @@ filename, version = sys.argv[1:]
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())