aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-06-14 14:14:02 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-06-20 17:23:27 +0200
commit31eead52e764569fc95ffaf56b25850fa260988b (patch)
tree6175f03cca3e019d013d5dd54cc2f2224f24fc24 /youtube_dl
parent038a3a1a614c2d67233f5822ae439da877b797ff (diff)
YoutubePlaylistIE: try to extract the url of the entries from the media$group dictionary
Extracting it from content can return rtsp urls.
Diffstat (limited to 'youtube_dl')
-rwxr-xr-xyoutube_dl/InfoExtractors.py12
1 files 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