always use yt-dlp wrapper
This commit is contained in:
parent
438271a3f2
commit
95272d4df2
1 changed files with 4 additions and 4 deletions
|
@ -143,8 +143,8 @@ def download(item_id, url, referer=None):
|
|||
has_audio = bool([fmt for fmt in formats['formats'] if fmt['resolution'] == 'audio only'])
|
||||
has_video = bool([fmt for fmt in formats['formats'] if 'x' in fmt['resolution']])
|
||||
|
||||
cmd = [
|
||||
'yt-dlp', '-q', url,
|
||||
cmd = YT_DLP + [
|
||||
'-q', url,
|
||||
'-o', '%(title)80s.%(ext)s'
|
||||
]
|
||||
if referer:
|
||||
|
@ -167,8 +167,8 @@ def download(item_id, url, referer=None):
|
|||
stderr=subprocess.PIPE, close_fds=True)
|
||||
stdout, stderr = p.communicate()
|
||||
if stderr and b'Requested format is not available.' in stderr:
|
||||
cmd = [
|
||||
'yt-dlp', '-q', url,
|
||||
cmd = YT_DLP + [
|
||||
'-q', url,
|
||||
'-o', '%(title)80s.%(ext)s'
|
||||
]
|
||||
if referer:
|
||||
|
|
Loading…
Add table
Reference in a new issue