1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-18 07:05:41 +07:00

Get the title of Youtube playlists

This commit is contained in:
Jaime Marquínez Ferrándiz
2013-04-20 18:57:05 +02:00
parent e905b6f80e
commit c72938240e
2 changed files with 5 additions and 1 deletions

View File

@@ -1801,6 +1801,8 @@ def _real_extract(self, url):
# Number of videos is a multiple of self._MAX_RESULTS
break
playlist_title = response['feed']['title']['$t']
videos += [ (entry['yt$position']['$t'], entry['content']['src'])
for entry in response['feed']['entry']
if 'content' in entry ]
@@ -1812,7 +1814,7 @@ def _real_extract(self, url):
videos = [v[1] for v in sorted(videos)]
url_results = [self.url_result(url, 'Youtube') for url in videos]
return [self.playlist_result(url_results, playlist_id)]
return [self.playlist_result(url_results, playlist_id, playlist_title)]
class YoutubeChannelIE(InfoExtractor):