mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-07-01 19:42:52 -05:00
[compat] Remove more functions
Removing any more will require changes to a large number of extractors
This commit is contained in:
@ -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())
|
||||
|
||||
|
Reference in New Issue
Block a user