Browse Source

[youtube] Playlists: extract the videos id from ['media$group']['yt$videoid'] (fixes #1374)

'media$player' is not defined for private videos.
rtmp_test
Jaime Marquínez Ferrándiz 11 years ago
parent
commit
c215217e39
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      youtube_dl/extractor/youtube.py

+ 5
- 2
youtube_dl/extractor/youtube.py View File

@ -943,8 +943,11 @@ class YoutubePlaylistIE(InfoExtractor):
for entry in response['feed']['entry']:
index = entry['yt$position']['$t']
if 'media$group' in entry and 'media$player' in entry['media$group']:
videos.append((index, entry['media$group']['media$player']['url']))
if 'media$group' in entry and 'yt$videoid' in entry['media$group']:
videos.append((
index,
'https://www.youtube.com/watch?v=' + entry['media$group']['yt$videoid']['$t']
))
videos = [v[1] for v in sorted(videos)]


Loading…
Cancel
Save