mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[youtube] fix VEVO when no 's' field presents
This commit is contained in:
parent
901cbaaf73
commit
5dd7b5fd10
@ -72,7 +72,7 @@ SITES = {
|
|||||||
'vk' : 'vk',
|
'vk' : 'vk',
|
||||||
'xiami' : 'xiami',
|
'xiami' : 'xiami',
|
||||||
'yinyuetai' : 'yinyuetai',
|
'yinyuetai' : 'yinyuetai',
|
||||||
'miaopai': 'yixia_miaopai',
|
'miaopai' : 'yixia_miaopai',
|
||||||
'youku' : 'youku',
|
'youku' : 'youku',
|
||||||
'youtu' : 'youtube',
|
'youtu' : 'youtube',
|
||||||
'youtube' : 'youtube',
|
'youtube' : 'youtube',
|
||||||
|
@ -276,13 +276,15 @@ class YouTube(VideoExtractor):
|
|||||||
for stream in streams: # audio
|
for stream in streams: # audio
|
||||||
if stream['type'].startswith('audio/mp4'):
|
if stream['type'].startswith('audio/mp4'):
|
||||||
dash_mp4_a_url = stream['url']
|
dash_mp4_a_url = stream['url']
|
||||||
sig = self.__class__.decipher(self.js, stream['s'])
|
if 's' in stream:
|
||||||
dash_mp4_a_url += '&signature={}'.format(sig)
|
sig = self.__class__.decipher(self.js, stream['s'])
|
||||||
|
dash_mp4_a_url += '&signature={}'.format(sig)
|
||||||
dash_mp4_a_size = stream['clen']
|
dash_mp4_a_size = stream['clen']
|
||||||
elif stream['type'].startswith('audio/webm'):
|
elif stream['type'].startswith('audio/webm'):
|
||||||
dash_webm_a_url = stream['url']
|
dash_webm_a_url = stream['url']
|
||||||
sig = self.__class__.decipher(self.js, stream['s'])
|
if 's' in stream:
|
||||||
dash_webm_a_url += '&signature={}'.format(sig)
|
sig = self.__class__.decipher(self.js, stream['s'])
|
||||||
|
dash_webm_a_url += '&signature={}'.format(sig)
|
||||||
dash_webm_a_size = stream['clen']
|
dash_webm_a_size = stream['clen']
|
||||||
for stream in streams: # video
|
for stream in streams: # video
|
||||||
if 'size' in stream:
|
if 'size' in stream:
|
||||||
|
Loading…
Reference in New Issue
Block a user