mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-01-29 01:27:52 +00:00
[cleanup] Misc (#12194)
Closes #12098, Closes #12133 Authored by: seproDev, bashonly, lonble, pjrobertson Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com> Co-authored-by: Lonble <74650029+lonble@users.noreply.github.com> Co-authored-by: Patrick Robertson <robertson.patrick@gmail.com>
This commit is contained in:
parent
421bc72103
commit
3b45319344
1
.gitignore
vendored
1
.gitignore
vendored
@ -92,6 +92,7 @@ updates_key.pem
|
|||||||
*.class
|
*.class
|
||||||
*.isorted
|
*.isorted
|
||||||
*.stackdump
|
*.stackdump
|
||||||
|
uv.lock
|
||||||
|
|
||||||
# Generated
|
# Generated
|
||||||
AUTHORS
|
AUTHORS
|
||||||
|
@ -239,5 +239,11 @@
|
|||||||
"action": "add",
|
"action": "add",
|
||||||
"when": "52c0ffe40ad6e8404d93296f575007b05b04c686",
|
"when": "52c0ffe40ad6e8404d93296f575007b05b04c686",
|
||||||
"short": "[priority] **Login with OAuth is no longer supported for YouTube**\nDue to a change made by the site, yt-dlp is no longer able to support OAuth login for YouTube. [Read more](https://github.com/yt-dlp/yt-dlp/issues/11462#issuecomment-2471703090)"
|
"short": "[priority] **Login with OAuth is no longer supported for YouTube**\nDue to a change made by the site, yt-dlp is no longer able to support OAuth login for YouTube. [Read more](https://github.com/yt-dlp/yt-dlp/issues/11462#issuecomment-2471703090)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": "change",
|
||||||
|
"when": "76ac023ff02f06e8c003d104f02a03deeddebdcd",
|
||||||
|
"short": "[ie/youtube:tab] Improve shorts title extraction (#11997)",
|
||||||
|
"authors": ["bashonly", "d3d9"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
parse_qs,
|
parse_qs,
|
||||||
parse_resolution,
|
parse_resolution,
|
||||||
qualities,
|
qualities,
|
||||||
sanitize_url,
|
|
||||||
smuggle_url,
|
smuggle_url,
|
||||||
srt_subtitles_timecode,
|
srt_subtitles_timecode,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
@ -1923,7 +1922,7 @@ def _real_extract(self, url):
|
|||||||
video_url = traverse_obj(post_data, (
|
video_url = traverse_obj(post_data, (
|
||||||
'data', 'item', (None, 'orig'), 'modules', 'module_dynamic',
|
'data', 'item', (None, 'orig'), 'modules', 'module_dynamic',
|
||||||
(('major', ('archive', 'pgc')), ('additional', ('reserve', 'common'))),
|
(('major', ('archive', 'pgc')), ('additional', ('reserve', 'common'))),
|
||||||
'jump_url', {url_or_none}, any, {sanitize_url}))
|
'jump_url', {url_or_none}, any, {self._proto_relative_url}))
|
||||||
if not video_url or (self.suitable(video_url) and post_id == self._match_id(video_url)):
|
if not video_url or (self.suitable(video_url) and post_id == self._match_id(video_url)):
|
||||||
raise ExtractorError('No valid video URL found', expected=True)
|
raise ExtractorError('No valid video URL found', expected=True)
|
||||||
return self.url_result(video_url)
|
return self.url_result(video_url)
|
||||||
|
@ -286,17 +286,19 @@ def _get_service_endpoint(self, did, video_id):
|
|||||||
services, ('service', lambda _, x: x['type'] == 'AtprotoPersonalDataServer',
|
services, ('service', lambda _, x: x['type'] == 'AtprotoPersonalDataServer',
|
||||||
'serviceEndpoint', {url_or_none}, any)) or 'https://bsky.social'
|
'serviceEndpoint', {url_or_none}, any)) or 'https://bsky.social'
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _extract_post(self, handle, post_id):
|
||||||
handle, video_id = self._match_valid_url(url).group('handle', 'id')
|
return self._download_json(
|
||||||
|
|
||||||
post = self._download_json(
|
|
||||||
'https://public.api.bsky.app/xrpc/app.bsky.feed.getPostThread',
|
'https://public.api.bsky.app/xrpc/app.bsky.feed.getPostThread',
|
||||||
video_id, query={
|
post_id, query={
|
||||||
'uri': f'at://{handle}/app.bsky.feed.post/{video_id}',
|
'uri': f'at://{handle}/app.bsky.feed.post/{post_id}',
|
||||||
'depth': 0,
|
'depth': 0,
|
||||||
'parentHeight': 0,
|
'parentHeight': 0,
|
||||||
})['thread']['post']
|
})['thread']['post']
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
handle, video_id = self._match_valid_url(url).group('handle', 'id')
|
||||||
|
post = self._extract_post(handle, video_id)
|
||||||
|
|
||||||
entries = []
|
entries = []
|
||||||
# app.bsky.embed.video.view/app.bsky.embed.external.view
|
# app.bsky.embed.video.view/app.bsky.embed.external.view
|
||||||
entries.extend(self._extract_videos(post, video_id))
|
entries.extend(self._extract_videos(post, video_id))
|
||||||
|
@ -39,7 +39,7 @@ def _parse_episode(self, episode):
|
|||||||
'description': ('body', {clean_html}),
|
'description': ('body', {clean_html}),
|
||||||
'thumbnail': ('largeThumbnail', {url_or_none}),
|
'thumbnail': ('largeThumbnail', {url_or_none}),
|
||||||
'duration': ('length', {int_or_none}),
|
'duration': ('length', {int_or_none}),
|
||||||
'date': ('dateSegments', 'published', {unified_strdate}),
|
'upload_date': ('dateSegments', 'published', {unified_strdate}),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class LaracastsIE(LaracastsBaseIE):
|
|||||||
'title': 'Hello, Laravel',
|
'title': 'Hello, Laravel',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'duration': 519,
|
'duration': 519,
|
||||||
'date': '20240312',
|
'upload_date': '20240312',
|
||||||
'thumbnail': 'https://laracasts.s3.amazonaws.com/videos/thumbnails/youtube/30-days-to-learn-laravel-11-1.png',
|
'thumbnail': 'https://laracasts.s3.amazonaws.com/videos/thumbnails/youtube/30-days-to-learn-laravel-11-1.png',
|
||||||
'description': 'md5:ddd658bb241975871d236555657e1dd1',
|
'description': 'md5:ddd658bb241975871d236555657e1dd1',
|
||||||
'season_number': 1,
|
'season_number': 1,
|
||||||
|
@ -26,7 +26,7 @@ class PlVideoIE(InfoExtractor):
|
|||||||
'comment_count': int,
|
'comment_count': int,
|
||||||
'tags': ['rusia', 'cuba', 'russia', 'miguel díaz-canel'],
|
'tags': ['rusia', 'cuba', 'russia', 'miguel díaz-canel'],
|
||||||
'description': 'md5:a1a395d900d77a86542a91ee0826c115',
|
'description': 'md5:a1a395d900d77a86542a91ee0826c115',
|
||||||
'released_timestamp': 1715096124,
|
'release_timestamp': 1715096124,
|
||||||
'channel_is_verified': True,
|
'channel_is_verified': True,
|
||||||
'like_count': int,
|
'like_count': int,
|
||||||
'timestamp': 1715095911,
|
'timestamp': 1715095911,
|
||||||
@ -62,7 +62,7 @@ class PlVideoIE(InfoExtractor):
|
|||||||
'title': 'Белоусов отменил приказы о кадровом резерве на гражданской службе',
|
'title': 'Белоусов отменил приказы о кадровом резерве на гражданской службе',
|
||||||
'channel_follower_count': int,
|
'channel_follower_count': int,
|
||||||
'view_count': int,
|
'view_count': int,
|
||||||
'released_timestamp': 1732961458,
|
'release_timestamp': 1732961458,
|
||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ def _real_extract(self, url):
|
|||||||
'channel_is_verified': ('channel', 'verified', {bool}),
|
'channel_is_verified': ('channel', 'verified', {bool}),
|
||||||
'tags': ('tags', ..., {str}),
|
'tags': ('tags', ..., {str}),
|
||||||
'timestamp': ('createdAt', {parse_iso8601}),
|
'timestamp': ('createdAt', {parse_iso8601}),
|
||||||
'released_timestamp': ('publishedAt', {parse_iso8601}),
|
'release_timestamp': ('publishedAt', {parse_iso8601}),
|
||||||
'modified_timestamp': ('updatedAt', {parse_iso8601}),
|
'modified_timestamp': ('updatedAt', {parse_iso8601}),
|
||||||
'view_count': ('stats', 'viewTotalCount', {int_or_none}),
|
'view_count': ('stats', 'viewTotalCount', {int_or_none}),
|
||||||
'like_count': ('stats', 'likeCount', {int_or_none}),
|
'like_count': ('stats', 'likeCount', {int_or_none}),
|
||||||
|
@ -24,8 +24,6 @@ class TVerIE(InfoExtractor):
|
|||||||
'channel': 'テレビ朝日',
|
'channel': 'テレビ朝日',
|
||||||
'id': 'ep83nf3w4p',
|
'id': 'ep83nf3w4p',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'onair_label': '5月3日(火)放送分',
|
|
||||||
'ext_title': '家事ヤロウ!!! 売り場席巻のチーズSP&財前直見×森泉親子の脱東京暮らし密着! テレビ朝日 5月3日(火)放送分',
|
|
||||||
},
|
},
|
||||||
'add_ie': ['BrightcoveNew'],
|
'add_ie': ['BrightcoveNew'],
|
||||||
}, {
|
}, {
|
||||||
|
@ -5333,7 +5333,7 @@ class FormatSorter:
|
|||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
'vcodec': {'type': 'ordered', 'regex': True,
|
'vcodec': {'type': 'ordered', 'regex': True,
|
||||||
'order': ['av0?1', 'vp0?9.0?2', 'vp0?9', '[hx]265|he?vc?', '[hx]264|avc', 'vp0?8', 'mp4v|h263', 'theora', '', None, 'none']},
|
'order': ['av0?1', r'vp0?9\.0?2', 'vp0?9', '[hx]265|he?vc?', '[hx]264|avc', 'vp0?8', 'mp4v|h263', 'theora', '', None, 'none']},
|
||||||
'acodec': {'type': 'ordered', 'regex': True,
|
'acodec': {'type': 'ordered', 'regex': True,
|
||||||
'order': ['[af]lac', 'wav|aiff', 'opus', 'vorbis|ogg', 'aac', 'mp?4a?', 'mp3', 'ac-?4', 'e-?a?c-?3', 'ac-?3', 'dts', '', None, 'none']},
|
'order': ['[af]lac', 'wav|aiff', 'opus', 'vorbis|ogg', 'aac', 'mp?4a?', 'mp3', 'ac-?4', 'e-?a?c-?3', 'ac-?3', 'dts', '', None, 'none']},
|
||||||
'hdr': {'type': 'ordered', 'regex': True, 'field': 'dynamic_range',
|
'hdr': {'type': 'ordered', 'regex': True, 'field': 'dynamic_range',
|
||||||
|
Loading…
Reference in New Issue
Block a user