mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-18 06:09:17 +00:00
[youtube] Playlists: extract the videos id from ['media$group']['yt$videoid'] (fixes #1374)
'media$player' is not defined for private videos.
This commit is contained in:
parent
08e291b54d
commit
c215217e39
|
@ -943,8 +943,11 @@ def _real_extract(self, url):
|
||||||
|
|
||||||
for entry in response['feed']['entry']:
|
for entry in response['feed']['entry']:
|
||||||
index = entry['yt$position']['$t']
|
index = entry['yt$position']['$t']
|
||||||
if 'media$group' in entry and 'media$player' in entry['media$group']:
|
if 'media$group' in entry and 'yt$videoid' in entry['media$group']:
|
||||||
videos.append((index, entry['media$group']['media$player']['url']))
|
videos.append((
|
||||||
|
index,
|
||||||
|
'https://www.youtube.com/watch?v=' + entry['media$group']['yt$videoid']['$t']
|
||||||
|
))
|
||||||
|
|
||||||
videos = [v[1] for v in sorted(videos)]
|
videos = [v[1] for v in sorted(videos)]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue