mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
YouTube: fix #308
This commit is contained in:
parent
75b6b57fca
commit
73ec97e6c6
@ -95,12 +95,16 @@ def youtube_download_by_id(id, title=None, output_dir='.', merge=True, info_only
|
||||
break
|
||||
|
||||
url = download_stream['url'][0]
|
||||
if 'sig' in download_stream:
|
||||
sig = download_stream['sig'][0]
|
||||
else:
|
||||
js = get_content(html5player)
|
||||
sig = decipher(js, download_stream['s'][0])
|
||||
url = '%s&signature=%s' % (url, sig)
|
||||
try:
|
||||
if 'sig' in download_stream:
|
||||
sig = download_stream['sig'][0]
|
||||
url = '%s&signature=%s' % (url, sig)
|
||||
else:
|
||||
js = get_content(html5player)
|
||||
sig = decipher(js, download_stream['s'][0])
|
||||
url = '%s&signature=%s' % (url, sig)
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
type, ext, size = url_info(url)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user