From ac668111128b5f124b4271b3aa4c35f6e71a4749 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 24 Jun 2022 13:40:17 +0530 Subject: [compat] Remove more functions Removing any more will require changes to a large number of extractors --- devscripts/update-formulae.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'devscripts/update-formulae.py') 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 # 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()) -- cgit v1.2.3