mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-17 09:36:13 +03:00
[cleanup] Replace dead example/test URL (#17061)
* Replace dead example URL in documentation * Replace primary Youtube test URL * Remove obsolete `test_youtube_lists` module Closes #12263 Authored by: bashonly
This commit is contained in:
@@ -30,7 +30,7 @@ class UnicodeBOMIE(InfoExtractor):
|
||||
_VALID_URL = r'(?P<bom>\ufeff)(?P<id>.*)$'
|
||||
|
||||
_TESTS = [{
|
||||
'url': '\ufeffhttp://www.youtube.com/watch?v=BaW_jenozKc',
|
||||
'url': '\ufeffhttp://www.youtube.com/watch?v=YE7VzlLtp-4',
|
||||
'only_matching': True,
|
||||
}]
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ class ViewSourceIE(InfoExtractor):
|
||||
_VALID_URL = r'view-source:(?P<url>.+)'
|
||||
|
||||
_TEST = {
|
||||
'url': 'view-source:https://www.youtube.com/watch?v=BaW_jenozKc',
|
||||
'url': 'view-source:https://www.youtube.com/watch?v=YE7VzlLtp-4',
|
||||
'only_matching': True,
|
||||
}
|
||||
|
||||
|
||||
@@ -778,7 +778,7 @@ class GenericIE(InfoExtractor):
|
||||
if default_search == 'auto_warning':
|
||||
if re.match(r'^(?:url|URL)$', url):
|
||||
raise ExtractorError(
|
||||
f'Invalid URL: {url!r} . Call yt-dlp like this: yt-dlp -v "https://www.youtube.com/watch?v=BaW_jenozKc" ',
|
||||
f'Invalid URL: {url!r} . Call yt-dlp like this: yt-dlp -v "https://www.youtube.com/watch?v=YE7VzlLtp-4" ',
|
||||
expected=True)
|
||||
else:
|
||||
self.report_warning(
|
||||
|
||||
@@ -47,8 +47,8 @@ class YoutubeTruncatedURLIE(YoutubeBaseInfoExtractor):
|
||||
'Did you forget to quote the URL? Remember that & is a meta '
|
||||
'character in most shells, so you want to put the URL in quotes, '
|
||||
'like yt-dlp '
|
||||
'"https://www.youtube.com/watch?feature=foo&v=BaW_jenozKc" '
|
||||
' or simply yt-dlp BaW_jenozKc .',
|
||||
'"https://www.youtube.com/watch?feature=foo&v=YE7VzlLtp-4" '
|
||||
' or simply yt-dlp YE7VzlLtp-4 .',
|
||||
expected=True)
|
||||
|
||||
|
||||
|
||||
@@ -152,37 +152,38 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
|
||||
IE_NAME = 'youtube'
|
||||
_TESTS = [{
|
||||
'url': 'https://www.youtube.com/watch?v=BaW_jenozKc&t=1s&end=9',
|
||||
'url': 'https://www.youtube.com/watch?v=YE7VzlLtp-4&t=1s&end=9',
|
||||
'info_dict': {
|
||||
'id': 'BaW_jenozKc',
|
||||
'id': 'YE7VzlLtp-4',
|
||||
'ext': 'mp4',
|
||||
'title': 'youtube-dl test video "\'/\\ä↭𝕐',
|
||||
'age_limit': 0,
|
||||
'availability': 'public',
|
||||
'categories': ['Science & Technology'],
|
||||
'channel': 'Philipp Hagemeister',
|
||||
'title': 'Big Buck Bunny',
|
||||
'description': 'md5:e95316924b5eca2a74b87ab0b290724a',
|
||||
'media_type': 'video',
|
||||
'uploader': 'Blender',
|
||||
'uploader_id': '@BlenderOfficial',
|
||||
'uploader_url': 'https://www.youtube.com/@BlenderOfficial',
|
||||
'channel': 'Blender',
|
||||
'channel_id': 'UCSMOQeBJ2RAnuFungnQOxLg',
|
||||
'channel_url': 'https://www.youtube.com/channel/UCSMOQeBJ2RAnuFungnQOxLg',
|
||||
'channel_is_verified': True,
|
||||
'channel_follower_count': int,
|
||||
'channel_id': 'UCLqxVugv74EIW3VWh2NOa3Q',
|
||||
'channel_url': 'https://www.youtube.com/channel/UCLqxVugv74EIW3VWh2NOa3Q',
|
||||
'comment_count': int,
|
||||
'description': 'md5:8fb536f4877b8a7455c2ec23794dbc22',
|
||||
'duration': 10,
|
||||
'end_time': 9,
|
||||
'heatmap': 'count:100',
|
||||
'like_count': int,
|
||||
'live_status': 'not_live',
|
||||
'playable_in_embed': True,
|
||||
'start_time': 1,
|
||||
'tags': 'count:1',
|
||||
'thumbnail': r're:https?://i\.ytimg\.com/.+',
|
||||
'timestamp': 1349198244,
|
||||
'upload_date': '20121002',
|
||||
'uploader': 'Philipp Hagemeister',
|
||||
'uploader_id': '@PhilippHagemeister',
|
||||
'uploader_url': 'https://www.youtube.com/@PhilippHagemeister',
|
||||
'view_count': int,
|
||||
'like_count': int,
|
||||
'age_limit': 0,
|
||||
'duration': 597,
|
||||
'thumbnail': 'https://i.ytimg.com/vi/YE7VzlLtp-4/maxresdefault.jpg',
|
||||
'heatmap': 'count:100',
|
||||
'start_time': 1.0,
|
||||
'end_time': 9.0,
|
||||
'categories': ['Film & Animation'],
|
||||
'tags': 'count:16',
|
||||
'timestamp': 1212060266,
|
||||
'upload_date': '20080529',
|
||||
'playable_in_embed': True,
|
||||
'availability': 'public',
|
||||
'live_status': 'not_live',
|
||||
},
|
||||
'skip': 'Video unavailable',
|
||||
}, {
|
||||
'note': 'Embed-only video (#1746)',
|
||||
'url': '//www.YouTube.com/watch?v=yZIXLfi8CZQ',
|
||||
@@ -197,35 +198,36 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'skip': 'Private video',
|
||||
}, {
|
||||
'note': 'Use the first video ID in the URL',
|
||||
'url': 'https://www.youtube.com/watch?v=BaW_jenozKc&v=yZIXLfi8CZQ',
|
||||
'url': 'https://www.youtube.com/watch?v=YE7VzlLtp-4&v=BaW_jenozKc',
|
||||
'info_dict': {
|
||||
'id': 'BaW_jenozKc',
|
||||
'id': 'YE7VzlLtp-4',
|
||||
'ext': 'mp4',
|
||||
'title': 'youtube-dl test video "\'/\\ä↭𝕐',
|
||||
'age_limit': 0,
|
||||
'availability': 'public',
|
||||
'categories': ['Science & Technology'],
|
||||
'channel': 'Philipp Hagemeister',
|
||||
'title': 'Big Buck Bunny',
|
||||
'description': 'md5:e95316924b5eca2a74b87ab0b290724a',
|
||||
'media_type': 'video',
|
||||
'uploader': 'Blender',
|
||||
'uploader_id': '@BlenderOfficial',
|
||||
'uploader_url': 'https://www.youtube.com/@BlenderOfficial',
|
||||
'channel': 'Blender',
|
||||
'channel_id': 'UCSMOQeBJ2RAnuFungnQOxLg',
|
||||
'channel_url': 'https://www.youtube.com/channel/UCSMOQeBJ2RAnuFungnQOxLg',
|
||||
'channel_is_verified': True,
|
||||
'channel_follower_count': int,
|
||||
'channel_id': 'UCLqxVugv74EIW3VWh2NOa3Q',
|
||||
'channel_url': 'https://www.youtube.com/channel/UCLqxVugv74EIW3VWh2NOa3Q',
|
||||
'comment_count': int,
|
||||
'description': 'md5:8fb536f4877b8a7455c2ec23794dbc22',
|
||||
'duration': 10,
|
||||
'heatmap': 'count:100',
|
||||
'like_count': int,
|
||||
'live_status': 'not_live',
|
||||
'playable_in_embed': True,
|
||||
'tags': 'count:1',
|
||||
'thumbnail': r're:https?://i\.ytimg\.com/.+',
|
||||
'timestamp': 1349198244,
|
||||
'upload_date': '20121002',
|
||||
'uploader': 'Philipp Hagemeister',
|
||||
'uploader_id': '@PhilippHagemeister',
|
||||
'uploader_url': 'https://www.youtube.com/@PhilippHagemeister',
|
||||
'view_count': int,
|
||||
'like_count': int,
|
||||
'age_limit': 0,
|
||||
'duration': 597,
|
||||
'thumbnail': 'https://i.ytimg.com/vi/YE7VzlLtp-4/maxresdefault.jpg',
|
||||
'heatmap': 'count:100',
|
||||
'categories': ['Film & Animation'],
|
||||
'tags': 'count:16',
|
||||
'timestamp': 1212060266,
|
||||
'upload_date': '20080529',
|
||||
'playable_in_embed': True,
|
||||
'availability': 'public',
|
||||
'live_status': 'not_live',
|
||||
},
|
||||
'skip': 'Video unavailable',
|
||||
}, {
|
||||
'note': '256k DASH audio (format 141) via DASH manifest',
|
||||
'url': 'https://www.youtube.com/watch?v=a9LDPn-MO4I',
|
||||
@@ -823,10 +825,10 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
'url': 'sJL6WA-aGkQ',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://invidio.us/watch?v=BaW_jenozKc',
|
||||
'url': 'https://invidio.us/watch?v=YE7VzlLtp-4',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
'url': 'https://redirect.invidious.io/watch?v=BaW_jenozKc',
|
||||
'url': 'https://redirect.invidious.io/watch?v=YE7VzlLtp-4',
|
||||
'only_matching': True,
|
||||
}, {
|
||||
# from https://nitter.pussthecat.org/YouTube/status/1360363141947944964#m
|
||||
|
||||
Reference in New Issue
Block a user