diff options
author | Jaime Marquínez Ferrándiz <[email protected]> | 2013-09-05 21:40:04 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <[email protected]> | 2013-09-05 21:40:04 +0200 |
commit | c215217e39ccc42c457220e29de7cf964be54ecf (patch) | |
tree | d22e5b8ec58b3548aaf478d906b01422d8a5a386 | |
parent | 08e291b54d8aaa34300c02e70ff86aaa36820a62 (diff) | |
download | youtube-dl-c215217e39ccc42c457220e29de7cf964be54ecf.tar.gz youtube-dl-c215217e39ccc42c457220e29de7cf964be54ecf.zip |
[youtube] Playlists: extract the videos id from ['media$group']['yt$videoid'] (fixes #1374)
'media$player' is not defined for private videos.
-rw-r--r-- | youtube_dl/extractor/youtube.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 01265ca28..782cb1cfb 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -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)] |