switch to yt-dlp
This commit is contained in:
parent
d191f24d03
commit
40e2481f61
3 changed files with 5 additions and 3 deletions
|
@ -37,7 +37,7 @@ info_key_map = {
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_info(url, referer=None):
|
def get_info(url, referer=None):
|
||||||
cmd = ['youtube-dl', '-j', '--all-subs', url]
|
cmd = ['yt-dlp', '-j', '--all-subs', url]
|
||||||
if referer:
|
if referer:
|
||||||
cmd += ['--referer', referer]
|
cmd += ['--referer', referer]
|
||||||
p = subprocess.Popen(cmd,
|
p = subprocess.Popen(cmd,
|
||||||
|
@ -99,7 +99,7 @@ def download(item_id, url, referer=None):
|
||||||
if isinstance(tmp, bytes):
|
if isinstance(tmp, bytes):
|
||||||
tmp = tmp.decode('utf-8')
|
tmp = tmp.decode('utf-8')
|
||||||
os.chdir(tmp)
|
os.chdir(tmp)
|
||||||
cmd = ['youtube-dl', '-q', media['url']]
|
cmd = ['yt-dlp', '-q', media['url']]
|
||||||
if referer:
|
if referer:
|
||||||
cmd += ['--referer', referer]
|
cmd += ['--referer', referer]
|
||||||
elif 'referer' in media:
|
elif 'referer' in media:
|
||||||
|
|
|
@ -10,7 +10,7 @@ requests<3.0.0,>=2.24.0
|
||||||
urllib3<2.0.0,>=1.25.2
|
urllib3<2.0.0,>=1.25.2
|
||||||
tornado<5
|
tornado<5
|
||||||
geoip2==4.1.0
|
geoip2==4.1.0
|
||||||
youtube-dl>=2021.4.26
|
yt-dlp>=2022.3.8.2
|
||||||
python-memcached
|
python-memcached
|
||||||
elasticsearch
|
elasticsearch
|
||||||
future
|
future
|
||||||
|
|
|
@ -299,6 +299,8 @@ if __name__ == "__main__":
|
||||||
run(join(base, 'pandora/manage.py'), 'update_geoip')
|
run(join(base, 'pandora/manage.py'), 'update_geoip')
|
||||||
if old <= 6383:
|
if old <= 6383:
|
||||||
run('./bin/pip', 'install', '-r', 'requirements.txt')
|
run('./bin/pip', 'install', '-r', 'requirements.txt')
|
||||||
|
if old < 6442:
|
||||||
|
run('./bin/pip', 'install', 'yt-dlp>=2022.3.8.2')
|
||||||
else:
|
else:
|
||||||
if len(sys.argv) == 1:
|
if len(sys.argv) == 1:
|
||||||
branch = get_branch()
|
branch = get_branch()
|
||||||
|
|
Loading…
Reference in a new issue