mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
[youtube] remove streams without contentLength (fix #2767)
This commit is contained in:
parent
5943fb6ca3
commit
c3ae61c04e
@ -451,6 +451,8 @@ class YouTube(VideoExtractor):
|
||||
for afmt in video_info['adaptive_fmts'][0].split(',')]
|
||||
else:
|
||||
streams = json.loads(video_info['player_response'][0])['streamingData']['adaptiveFormats']
|
||||
# streams without contentLength got broken urls, just remove them (#2767)
|
||||
streams = [stream for stream in streams if 'contentLength' in stream]
|
||||
for stream in streams:
|
||||
stream['itag'] = str(stream['itag'])
|
||||
if 'qualityLabel' in stream:
|
||||
|
Loading…
Reference in New Issue
Block a user