summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <[email protected]>2013-09-05 21:40:04 +0200
committerJaime Marquínez Ferrándiz <[email protected]>2013-09-05 21:40:04 +0200
commitc215217e39ccc42c457220e29de7cf964be54ecf (patch)
treed22e5b8ec58b3548aaf478d906b01422d8a5a386
parent08e291b54d8aaa34300c02e70ff86aaa36820a62 (diff)
downloadyoutube-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.py7
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)]