X-Git-Url: https://jfr.im/git/yt-dlp.git/blobdiff_plain/c3dd69eab40d1e006962a8a2b2ebc2dce94e1aec..a636203ea57337144583790df2639812aeda40c6:/youtube_dl/extractor/youtube.py diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index d331aa01b..782cb1cfb 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -154,7 +154,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): _NEXT_URL_RE = r'[\?&]next_url=([^&]+)' # Listed in order of quality _available_formats = ['38', '37', '46', '22', '45', '35', '44', '34', '18', '43', '6', '5', '36', '17', '13', - # AHLS + # Apple HTTP Live Streaming '96', '95', '94', '93', '92', '132', '151', # 3D '85', '84', '102', '83', '101', '82', '100', @@ -165,7 +165,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): '141', '172', '140', '171', '139', ] _available_formats_prefer_free = ['38', '46', '37', '45', '22', '44', '35', '43', '34', '18', '6', '5', '36', '17', '13', - # AHLS + # Apple HTTP Live Streaming '96', '95', '94', '93', '92', '132', '151', # 3D '85', '102', '84', '101', '83', '100', '82', @@ -203,7 +203,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): '101': 'webm', '102': 'webm', - # AHLS + # Apple HTTP Live Streaming '92': 'mp4', '93': 'mp4', '94': 'mp4', @@ -943,8 +943,11 @@ def _real_extract(self, url): 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)]