mirror of
https://github.com/l1ving/youtube-dl
synced 2024-12-22 16:02:52 +08:00
[youtube] Fix multifeed extraction (closes #18531)
This commit is contained in:
parent
0a05cfabb6
commit
8fe104947d
@ -1712,11 +1712,16 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
else:
|
else:
|
||||||
video_description = ''
|
video_description = ''
|
||||||
|
|
||||||
if 'multifeed_metadata_list' in video_info and not smuggled_data.get('force_singlefeed', False):
|
if not smuggled_data.get('force_singlefeed', False):
|
||||||
if not self._downloader.params.get('noplaylist'):
|
if not self._downloader.params.get('noplaylist'):
|
||||||
|
multifeed_metadata_list = try_get(
|
||||||
|
player_response,
|
||||||
|
lambda x: x['multicamera']['playerLegacyMulticameraRenderer']['metadataList'],
|
||||||
|
compat_str) or try_get(
|
||||||
|
video_info, lambda x: x['multifeed_metadata_list'][0], compat_str)
|
||||||
|
if multifeed_metadata_list:
|
||||||
entries = []
|
entries = []
|
||||||
feed_ids = []
|
feed_ids = []
|
||||||
multifeed_metadata_list = video_info['multifeed_metadata_list'][0]
|
|
||||||
for feed in multifeed_metadata_list.split(','):
|
for feed in multifeed_metadata_list.split(','):
|
||||||
# Unquote should take place before split on comma (,) since textual
|
# Unquote should take place before split on comma (,) since textual
|
||||||
# fields may contain comma as well (see
|
# fields may contain comma as well (see
|
||||||
@ -1735,6 +1740,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
'Downloading multifeed video (%s) - add --no-playlist to just download video %s'
|
'Downloading multifeed video (%s) - add --no-playlist to just download video %s'
|
||||||
% (', '.join(feed_ids), video_id))
|
% (', '.join(feed_ids), video_id))
|
||||||
return self.playlist_result(entries, video_id, video_title, video_description)
|
return self.playlist_result(entries, video_id, video_title, video_description)
|
||||||
|
else:
|
||||||
self.to_screen('Downloading just video %s because of --no-playlist' % video_id)
|
self.to_screen('Downloading just video %s because of --no-playlist' % video_id)
|
||||||
|
|
||||||
if view_count is None:
|
if view_count is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user