mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-14 04:13:20 +00:00
[youtube] Update tests and add a tests for #18804
This commit is contained in:
parent
a16c7c033a
commit
4fe54c128a
|
@ -498,7 +498,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'channel_id': 'UCLqxVugv74EIW3VWh2NOa3Q',
|
'channel_id': 'UCLqxVugv74EIW3VWh2NOa3Q',
|
||||||
'channel_url': r're:https?://(?:www\.)?youtube\.com/channel/UCLqxVugv74EIW3VWh2NOa3Q',
|
'channel_url': r're:https?://(?:www\.)?youtube\.com/channel/UCLqxVugv74EIW3VWh2NOa3Q',
|
||||||
'upload_date': '20121002',
|
'upload_date': '20121002',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'description': 'test chars: "\'/\\ä↭𝕐\ntest URL: https://github.com/rg3/youtube-dl/issues/1892\n\nThis is a test video for youtube-dl.\n\nFor more information, contact phihag@phihag.de .',
|
'description': 'test chars: "\'/\\ä↭𝕐\ntest URL: https://github.com/rg3/youtube-dl/issues/1892\n\nThis is a test video for youtube-dl.\n\nFor more information, contact phihag@phihag.de .',
|
||||||
'categories': ['Science & Technology'],
|
'categories': ['Science & Technology'],
|
||||||
'tags': ['youtube-dl'],
|
'tags': ['youtube-dl'],
|
||||||
|
@ -527,7 +526,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader': 'Icona Pop',
|
'uploader': 'Icona Pop',
|
||||||
'uploader_id': 'IconaPop',
|
'uploader_id': 'IconaPop',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/IconaPop',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/IconaPop',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'creator': 'Icona Pop',
|
'creator': 'Icona Pop',
|
||||||
'track': 'I Love It (feat. Charli XCX)',
|
'track': 'I Love It (feat. Charli XCX)',
|
||||||
'artist': 'Icona Pop',
|
'artist': 'Icona Pop',
|
||||||
|
@ -540,14 +538,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'id': '07FYdnEawAQ',
|
'id': '07FYdnEawAQ',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'upload_date': '20130703',
|
'upload_date': '20130703',
|
||||||
'title': 'Justin Timberlake - Tunnel Vision (Explicit)',
|
'title': 'Justin Timberlake - Tunnel Vision (Official Music Video) (Explicit)',
|
||||||
'alt_title': 'Tunnel Vision',
|
'alt_title': 'Tunnel Vision',
|
||||||
'description': 'md5:64249768eec3bc4276236606ea996373',
|
'description': 'md5:07dab3356cde4199048e4c7cd93471e1',
|
||||||
'duration': 419,
|
'duration': 419,
|
||||||
'uploader': 'justintimberlakeVEVO',
|
'uploader': 'justintimberlakeVEVO',
|
||||||
'uploader_id': 'justintimberlakeVEVO',
|
'uploader_id': 'justintimberlakeVEVO',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/justintimberlakeVEVO',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/justintimberlakeVEVO',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'creator': 'Justin Timberlake',
|
'creator': 'Justin Timberlake',
|
||||||
'track': 'Tunnel Vision',
|
'track': 'Tunnel Vision',
|
||||||
'artist': 'Justin Timberlake',
|
'artist': 'Justin Timberlake',
|
||||||
|
@ -566,7 +563,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader': 'SET India',
|
'uploader': 'SET India',
|
||||||
'uploader_id': 'setindia',
|
'uploader_id': 'setindia',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/setindia',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/setindia',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -581,7 +577,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader_id': 'phihag',
|
'uploader_id': 'phihag',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/phihag',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/phihag',
|
||||||
'upload_date': '20121002',
|
'upload_date': '20121002',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'description': 'test chars: "\'/\\ä↭𝕐\ntest URL: https://github.com/rg3/youtube-dl/issues/1892\n\nThis is a test video for youtube-dl.\n\nFor more information, contact phihag@phihag.de .',
|
'description': 'test chars: "\'/\\ä↭𝕐\ntest URL: https://github.com/rg3/youtube-dl/issues/1892\n\nThis is a test video for youtube-dl.\n\nFor more information, contact phihag@phihag.de .',
|
||||||
'categories': ['Science & Technology'],
|
'categories': ['Science & Technology'],
|
||||||
'tags': ['youtube-dl'],
|
'tags': ['youtube-dl'],
|
||||||
|
@ -605,7 +600,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/8KVIDEO',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/8KVIDEO',
|
||||||
'description': '',
|
'description': '',
|
||||||
'uploader': '8KVIDEO',
|
'uploader': '8KVIDEO',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'title': 'UHDTV TEST 8K VIDEO.mp4'
|
'title': 'UHDTV TEST 8K VIDEO.mp4'
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
|
@ -620,13 +614,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': 'IB3lcPjvWLA',
|
'id': 'IB3lcPjvWLA',
|
||||||
'ext': 'm4a',
|
'ext': 'm4a',
|
||||||
'title': 'Afrojack, Spree Wilson - The Spark ft. Spree Wilson',
|
'title': 'Afrojack, Spree Wilson - The Spark (Official Music Video) ft. Spree Wilson',
|
||||||
'description': 'md5:1900ed86ee514927b9e00fbead6969a5',
|
'description': 'md5:8f5e2b82460520b619ccac1f509d43bf',
|
||||||
'duration': 244,
|
'duration': 244,
|
||||||
'uploader': 'AfrojackVEVO',
|
'uploader': 'AfrojackVEVO',
|
||||||
'uploader_id': 'AfrojackVEVO',
|
'uploader_id': 'AfrojackVEVO',
|
||||||
'upload_date': '20131011',
|
'upload_date': '20131011',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'youtube_include_dash_manifest': True,
|
'youtube_include_dash_manifest': True,
|
||||||
|
@ -640,13 +633,11 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'id': 'nfWlot6h_JM',
|
'id': 'nfWlot6h_JM',
|
||||||
'ext': 'm4a',
|
'ext': 'm4a',
|
||||||
'title': 'Taylor Swift - Shake It Off',
|
'title': 'Taylor Swift - Shake It Off',
|
||||||
'alt_title': 'Shake It Off',
|
'description': 'md5:bec2185232c05479482cb5a9b82719bf',
|
||||||
'description': 'md5:95f66187cd7c8b2c13eb78e1223b63c3',
|
|
||||||
'duration': 242,
|
'duration': 242,
|
||||||
'uploader': 'TaylorSwiftVEVO',
|
'uploader': 'TaylorSwiftVEVO',
|
||||||
'uploader_id': 'TaylorSwiftVEVO',
|
'uploader_id': 'TaylorSwiftVEVO',
|
||||||
'upload_date': '20140818',
|
'upload_date': '20140818',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'creator': 'Taylor Swift',
|
'creator': 'Taylor Swift',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
|
@ -662,10 +653,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'duration': 219,
|
'duration': 219,
|
||||||
'upload_date': '20100909',
|
'upload_date': '20100909',
|
||||||
'uploader': 'TJ Kirk',
|
'uploader': 'Amazing Atheist',
|
||||||
'uploader_id': 'TheAmazingAtheist',
|
'uploader_id': 'TheAmazingAtheist',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/TheAmazingAtheist',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/TheAmazingAtheist',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'title': 'Burning Everyone\'s Koran',
|
'title': 'Burning Everyone\'s Koran',
|
||||||
'description': 'SUBSCRIBE: http://www.youtube.com/saturninefilms\n\nEven Obama has taken a stand against freedom on this issue: http://www.huffingtonpost.com/2010/09/09/obama-gma-interview-quran_n_710282.html',
|
'description': 'SUBSCRIBE: http://www.youtube.com/saturninefilms\n\nEven Obama has taken a stand against freedom on this issue: http://www.huffingtonpost.com/2010/09/09/obama-gma-interview-quran_n_710282.html',
|
||||||
}
|
}
|
||||||
|
@ -683,7 +673,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader_id': 'WitcherGame',
|
'uploader_id': 'WitcherGame',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/WitcherGame',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/WitcherGame',
|
||||||
'upload_date': '20140605',
|
'upload_date': '20140605',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -692,7 +681,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'url': 'https://www.youtube.com/watch?v=6kLq3WMV1nU',
|
'url': 'https://www.youtube.com/watch?v=6kLq3WMV1nU',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '6kLq3WMV1nU',
|
'id': '6kLq3WMV1nU',
|
||||||
'ext': 'webm',
|
'ext': 'mp4',
|
||||||
'title': 'Dedication To My Ex (Miss That) (Lyric Video)',
|
'title': 'Dedication To My Ex (Miss That) (Lyric Video)',
|
||||||
'description': 'md5:33765bb339e1b47e7e72b5490139bb41',
|
'description': 'md5:33765bb339e1b47e7e72b5490139bb41',
|
||||||
'duration': 246,
|
'duration': 246,
|
||||||
|
@ -700,7 +689,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader_id': 'LloydVEVO',
|
'uploader_id': 'LloydVEVO',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/LloydVEVO',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/LloydVEVO',
|
||||||
'upload_date': '20110629',
|
'upload_date': '20110629',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -718,7 +706,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'creator': 'deadmau5',
|
'creator': 'deadmau5',
|
||||||
'description': 'md5:12c56784b8032162bb936a5f76d55360',
|
'description': 'md5:12c56784b8032162bb936a5f76d55360',
|
||||||
'uploader': 'deadmau5',
|
'uploader': 'deadmau5',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'title': 'Deadmau5 - Some Chords (HD)',
|
'title': 'Deadmau5 - Some Chords (HD)',
|
||||||
'alt_title': 'Some Chords',
|
'alt_title': 'Some Chords',
|
||||||
},
|
},
|
||||||
|
@ -736,7 +723,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'upload_date': '20150827',
|
'upload_date': '20150827',
|
||||||
'uploader_id': 'olympic',
|
'uploader_id': 'olympic',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/olympic',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/olympic',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'description': 'HO09 - Women - GER-AUS - Hockey - 31 July 2012 - London 2012 Olympic Games',
|
'description': 'HO09 - Women - GER-AUS - Hockey - 31 July 2012 - London 2012 Olympic Games',
|
||||||
'uploader': 'Olympic',
|
'uploader': 'Olympic',
|
||||||
'title': 'Hockey - Women - GER-AUS - London 2012 Olympic Games',
|
'title': 'Hockey - Women - GER-AUS - London 2012 Olympic Games',
|
||||||
|
@ -758,7 +744,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/AllenMeow',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/AllenMeow',
|
||||||
'description': 'made by Wacom from Korea | 字幕&加油添醋 by TY\'s Allen | 感謝heylisa00cavey1001同學熱情提供梗及翻譯',
|
'description': 'made by Wacom from Korea | 字幕&加油添醋 by TY\'s Allen | 感謝heylisa00cavey1001同學熱情提供梗及翻譯',
|
||||||
'uploader': '孫ᄋᄅ',
|
'uploader': '孫ᄋᄅ',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'title': '[A-made] 變態妍字幕版 太妍 我就是這樣的人',
|
'title': '[A-made] 變態妍字幕版 太妍 我就是這樣的人',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -792,7 +777,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader_id': 'dorappi2000',
|
'uploader_id': 'dorappi2000',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/dorappi2000',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/dorappi2000',
|
||||||
'uploader': 'dorappi2000',
|
'uploader': 'dorappi2000',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'formats': 'mincount:31',
|
'formats': 'mincount:31',
|
||||||
},
|
},
|
||||||
'skip': 'not actual anymore',
|
'skip': 'not actual anymore',
|
||||||
|
@ -808,7 +792,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader': 'Airtek',
|
'uploader': 'Airtek',
|
||||||
'description': 'Retransmisión en directo de la XVIII media maratón de Zaragoza.',
|
'description': 'Retransmisión en directo de la XVIII media maratón de Zaragoza.',
|
||||||
'uploader_id': 'UCzTzUmjXxxacNnL8I3m4LnQ',
|
'uploader_id': 'UCzTzUmjXxxacNnL8I3m4LnQ',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'title': 'Retransmisión XVIII Media maratón Zaragoza 2015',
|
'title': 'Retransmisión XVIII Media maratón Zaragoza 2015',
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
|
@ -881,6 +864,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
|
'skip': 'This video is not available.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
# Multifeed video with comma in title (see https://github.com/rg3/youtube-dl/issues/8536)
|
# Multifeed video with comma in title (see https://github.com/rg3/youtube-dl/issues/8536)
|
||||||
|
@ -917,7 +901,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader_id': 'IronSoulElf',
|
'uploader_id': 'IronSoulElf',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/IronSoulElf',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/IronSoulElf',
|
||||||
'uploader': 'IronSoulElf',
|
'uploader': 'IronSoulElf',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'creator': 'Todd Haberman, Daniel Law Heath and Aaron Kaplan',
|
'creator': 'Todd Haberman, Daniel Law Heath and Aaron Kaplan',
|
||||||
'track': 'Dark Walk - Position Music',
|
'track': 'Dark Walk - Position Music',
|
||||||
'artist': 'Todd Haberman, Daniel Law Heath and Aaron Kaplan',
|
'artist': 'Todd Haberman, Daniel Law Heath and Aaron Kaplan',
|
||||||
|
@ -1021,13 +1004,12 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'id': 'iqKdEhx-dD4',
|
'id': 'iqKdEhx-dD4',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Isolation - Mind Field (Ep 1)',
|
'title': 'Isolation - Mind Field (Ep 1)',
|
||||||
'description': 'md5:25b78d2f64ae81719f5c96319889b736',
|
'description': 'md5:46a29be4ceffa65b92d277b93f463c0f',
|
||||||
'duration': 2085,
|
'duration': 2085,
|
||||||
'upload_date': '20170118',
|
'upload_date': '20170118',
|
||||||
'uploader': 'Vsauce',
|
'uploader': 'Vsauce',
|
||||||
'uploader_id': 'Vsauce',
|
'uploader_id': 'Vsauce',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/Vsauce',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/user/Vsauce',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
'series': 'Mind Field',
|
'series': 'Mind Field',
|
||||||
'season_number': 1,
|
'season_number': 1,
|
||||||
'episode_number': 1,
|
'episode_number': 1,
|
||||||
|
@ -1053,7 +1035,6 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
'uploader': 'New Century Foundation',
|
'uploader': 'New Century Foundation',
|
||||||
'uploader_id': 'UCEJYpZGqgUob0zVVEaLhvVg',
|
'uploader_id': 'UCEJYpZGqgUob0zVVEaLhvVg',
|
||||||
'uploader_url': r're:https?://(?:www\.)?youtube\.com/channel/UCEJYpZGqgUob0zVVEaLhvVg',
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/channel/UCEJYpZGqgUob0zVVEaLhvVg',
|
||||||
'license': 'Standard YouTube License',
|
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
|
@ -1081,6 +1062,26 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||||
# DRM protected
|
# DRM protected
|
||||||
'url': 'https://www.youtube.com/watch?v=s7_qI6_mIXc',
|
'url': 'https://www.youtube.com/watch?v=s7_qI6_mIXc',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
# Video with unsupported adaptive stream type formats
|
||||||
|
'url': 'https://www.youtube.com/watch?v=Z4Vy8R84T1U',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'Z4Vy8R84T1U',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'saman SMAN 53 Jakarta(Sancety) opening COFFEE4th at SMAN 53 Jakarta',
|
||||||
|
'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
|
||||||
|
'duration': 433,
|
||||||
|
'upload_date': '20130923',
|
||||||
|
'uploader': 'Amelia Putri Harwita',
|
||||||
|
'uploader_id': 'UCpOxM49HJxmC1qCalXyB3_Q',
|
||||||
|
'uploader_url': r're:https?://(?:www\.)?youtube\.com/channel/UCpOxM49HJxmC1qCalXyB3_Q',
|
||||||
|
'formats': 'maxcount:10',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
'youtube_include_dash_manifest': False,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue