From 2974c24a78f2d020d952341813f71f648b07b09b Mon Sep 17 00:00:00 2001 From: JChris246 Date: Sun, 16 Mar 2025 20:55:13 -0400 Subject: [PATCH] refactor: update test case with playlist result --- yt_dlp/extractor/youtube/_video.py | 56 +++++++++++++++++------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/yt_dlp/extractor/youtube/_video.py b/yt_dlp/extractor/youtube/_video.py index 89c7054ab..6d30c6962 100644 --- a/yt_dlp/extractor/youtube/_video.py +++ b/yt_dlp/extractor/youtube/_video.py @@ -1761,32 +1761,40 @@ class YoutubeIE(YoutubeBaseInfoExtractor): 'url': 'https://www.youtube.com/feeds/videos.xml?channel_id=UC7_gcs09iThXybpVgjHZ_7g', 'md5': '7d66034582204a3ac425c71eb6b7b6e0', 'info_dict': { - 'id': 'cfkU4CD91hk', - 'ext': 'mp4', - 'title': 'How Astrophysics Can (LITERALLY) Save the World', - 'upload_date': '20250313', - 'description': 'md5:7d66034582204a3ac425c71eb6b7b6e0', + 'id': 'videos', + 'title': 'PBS Space Time', 'age_limit': 0, - 'tags': list, - 'channel_id': 'UC7_gcs09iThXybpVgjHZ_7g', - 'playable_in_embed': True, - 'thumbnail': 'https://i.ytimg.com/vi/cfkU4CD91hk/maxresdefault.jpg', - 'like_count': int, - 'comment_count': int, - 'channel': 'PBS Space Time', - 'live_status': 'not_live', - 'channel_url': 'https://www.youtube.com/channel/UC7_gcs09iThXybpVgjHZ_7g', - 'availability': 'public', - 'duration': 1194, - 'view_count': int, - 'categories': ['Education'], - 'channel_follower_count': int, - 'uploader': 'PBS Space Time', - 'uploader_url': 'https://www.youtube.com/@pbsspacetime', - 'uploader_id': '@pbsspacetime', - 'timestamp': 1741896682, - 'channel_is_verified': True, }, + 'playlist_count': 15, + 'playlist': [{ + 'info_dict': { + 'id': str, + 'title': str, + 'ext': 'mp4', + 'upload_date': str, + 'description': str, + 'age_limit': 0, + 'tags': list, + 'channel_id': 'UC7_gcs09iThXybpVgjHZ_7g', + 'playable_in_embed': True, + 'thumbnail': r're:https://.+\.jpg', + 'like_count': int, + 'comment_count': int, + 'channel': 'PBS Space Time', + 'live_status': 'not_live', + 'channel_url': 'https://www.youtube.com/channel/UC7_gcs09iThXybpVgjHZ_7g', + 'availability': 'public', + 'duration': int, + 'view_count': int, + 'categories': list, + 'channel_follower_count': int, + 'uploader': 'PBS Space Time', + 'uploader_url': 'https://www.youtube.com/@pbsspacetime', + 'uploader_id': '@pbsspacetime', + 'timestamp': int, + 'channel_is_verified': True, + } + }], 'params': { 'skip_download': True, },