|
|
|
@ -19,10 +19,13 @@ if 'signature' in versions_info:
|
|
|
|
|
|
|
|
|
|
new_version = {}
|
|
|
|
|
|
|
|
|
|
filenames = {'bin': 'youtube-dl', 'exe': 'youtube-dl.exe', 'tar': 'youtube-dl-%s.tar.gz' % version}
|
|
|
|
|
filenames = {
|
|
|
|
|
'bin': 'youtube-dl',
|
|
|
|
|
'exe': 'youtube-dl.exe',
|
|
|
|
|
'tar': 'youtube-dl-%s.tar.gz' % version}
|
|
|
|
|
for key, filename in filenames.items():
|
|
|
|
|
print('Downloading and checksumming %s...' %filename)
|
|
|
|
|
url = 'http://youtube-dl.org/downloads/%s/%s' % (version, filename)
|
|
|
|
|
print('Downloading and checksumming %s...' % filename)
|
|
|
|
|
url = 'https://yt-dl.org/downloads/%s/%s' % (version, filename)
|
|
|
|
|
data = urllib.request.urlopen(url).read()
|
|
|
|
|
sha256sum = hashlib.sha256(data).hexdigest()
|
|
|
|
|
new_version[key] = (url, sha256sum)
|
|
|
|
@ -30,4 +33,5 @@ for key, filename in filenames.items():
|
|
|
|
|
versions_info['versions'][version] = new_version
|
|
|
|
|
versions_info['latest'] = version
|
|
|
|
|
|
|
|
|
|
json.dump(versions_info, open('update/versions.json', 'w'), indent=4, sort_keys=True)
|
|
|
|
|
with open('update/versions.json', 'w') as jsonf:
|
|
|
|
|
json.dump(versions_info, jsonf, indent=4, sort_keys=True)
|
|
|
|
|