From 31eead52e764569fc95ffaf56b25850fa260988b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Fri, 14 Jun 2013 14:14:02 +0200 Subject: [PATCH 1/2] YoutubePlaylistIE: try to extract the url of the entries from the media$group dictionary Extracting it from content can return rtsp urls. --- youtube_dl/InfoExtractors.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index d9c555643..418c23f74 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -1606,9 +1606,15 @@ class YoutubePlaylistIE(InfoExtractor): # Number of videos is a multiple of self._MAX_RESULTS break - videos += [ (entry['yt$position']['$t'], entry['content']['src']) - for entry in response['feed']['entry'] - if 'content' in entry ] + 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'])) + # Using this field can cause problems: + # https://github.com/rg3/youtube-dl/issues/886 + elif 'content' in entry: + videos.append((index, entry['content']['src'])) + if len(response['feed']['entry']) < self._MAX_RESULTS: break From 953dd93a481dc879033e92a8f1547782af04d6ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Sat, 22 Jun 2013 12:32:27 +0200 Subject: [PATCH 2/2] YoutubePlaylistIE: don't look into entry['content']['src'], accruing to the docs this can return live stream urls --- youtube_dl/InfoExtractors.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 418c23f74..f5006d23e 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -1610,11 +1610,6 @@ class YoutubePlaylistIE(InfoExtractor): 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'])) - # Using this field can cause problems: - # https://github.com/rg3/youtube-dl/issues/886 - elif 'content' in entry: - videos.append((index, entry['content']['src'])) - if len(response['feed']['entry']) < self._MAX_RESULTS: break