diff --git a/.gitignore b/.gitignore index fdd904f7f..8fcd0de64 100644 --- a/.gitignore +++ b/.gitignore @@ -92,6 +92,7 @@ updates_key.pem *.class *.isorted *.stackdump +uv.lock # Generated AUTHORS diff --git a/devscripts/changelog_override.json b/devscripts/changelog_override.json index 079e2f729..8aa7b7e2b 100644 --- a/devscripts/changelog_override.json +++ b/devscripts/changelog_override.json @@ -239,5 +239,11 @@ "action": "add", "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)" + }, + { + "action": "change", + "when": "76ac023ff02f06e8c003d104f02a03deeddebdcd", + "short": "[ie/youtube:tab] Improve shorts title extraction (#11997)", + "authors": ["bashonly", "d3d9"] } ] diff --git a/yt_dlp/extractor/bilibili.py b/yt_dlp/extractor/bilibili.py index dd1f2e424..42b4e2d3c 100644 --- a/yt_dlp/extractor/bilibili.py +++ b/yt_dlp/extractor/bilibili.py @@ -34,7 +34,6 @@ from ..utils import ( parse_qs, parse_resolution, qualities, - sanitize_url, smuggle_url, srt_subtitles_timecode, str_or_none, @@ -1923,7 +1922,7 @@ class BiliBiliDynamicIE(InfoExtractor): video_url = traverse_obj(post_data, ( 'data', 'item', (None, 'orig'), 'modules', 'module_dynamic', (('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)): raise ExtractorError('No valid video URL found', expected=True) return self.url_result(video_url) diff --git a/yt_dlp/extractor/bluesky.py b/yt_dlp/extractor/bluesky.py index 42dadf7b9..23344ac6c 100644 --- a/yt_dlp/extractor/bluesky.py +++ b/yt_dlp/extractor/bluesky.py @@ -286,17 +286,19 @@ class BlueskyIE(InfoExtractor): services, ('service', lambda _, x: x['type'] == 'AtprotoPersonalDataServer', 'serviceEndpoint', {url_or_none}, any)) or 'https://bsky.social' - def _real_extract(self, url): - handle, video_id = self._match_valid_url(url).group('handle', 'id') - - post = self._download_json( + def _extract_post(self, handle, post_id): + return self._download_json( 'https://public.api.bsky.app/xrpc/app.bsky.feed.getPostThread', - video_id, query={ - 'uri': f'at://{handle}/app.bsky.feed.post/{video_id}', + post_id, query={ + 'uri': f'at://{handle}/app.bsky.feed.post/{post_id}', 'depth': 0, 'parentHeight': 0, })['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 = [] # app.bsky.embed.video.view/app.bsky.embed.external.view entries.extend(self._extract_videos(post, video_id)) diff --git a/yt_dlp/extractor/laracasts.py b/yt_dlp/extractor/laracasts.py index 4a61d6ab1..e532caf85 100644 --- a/yt_dlp/extractor/laracasts.py +++ b/yt_dlp/extractor/laracasts.py @@ -39,7 +39,7 @@ class LaracastsBaseIE(InfoExtractor): 'description': ('body', {clean_html}), 'thumbnail': ('largeThumbnail', {url_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', 'ext': 'mp4', 'duration': 519, - 'date': '20240312', + 'upload_date': '20240312', 'thumbnail': 'https://laracasts.s3.amazonaws.com/videos/thumbnails/youtube/30-days-to-learn-laravel-11-1.png', 'description': 'md5:ddd658bb241975871d236555657e1dd1', 'season_number': 1, diff --git a/yt_dlp/extractor/plvideo.py b/yt_dlp/extractor/plvideo.py index 9351af10a..27009ca4c 100644 --- a/yt_dlp/extractor/plvideo.py +++ b/yt_dlp/extractor/plvideo.py @@ -26,7 +26,7 @@ class PlVideoIE(InfoExtractor): 'comment_count': int, 'tags': ['rusia', 'cuba', 'russia', 'miguel díaz-canel'], 'description': 'md5:a1a395d900d77a86542a91ee0826c115', - 'released_timestamp': 1715096124, + 'release_timestamp': 1715096124, 'channel_is_verified': True, 'like_count': int, 'timestamp': 1715095911, @@ -62,7 +62,7 @@ class PlVideoIE(InfoExtractor): 'title': 'Белоусов отменил приказы о кадровом резерве на гражданской службе', 'channel_follower_count': int, 'view_count': int, - 'released_timestamp': 1732961458, + 'release_timestamp': 1732961458, }, }] @@ -119,7 +119,7 @@ class PlVideoIE(InfoExtractor): 'channel_is_verified': ('channel', 'verified', {bool}), 'tags': ('tags', ..., {str}), 'timestamp': ('createdAt', {parse_iso8601}), - 'released_timestamp': ('publishedAt', {parse_iso8601}), + 'release_timestamp': ('publishedAt', {parse_iso8601}), 'modified_timestamp': ('updatedAt', {parse_iso8601}), 'view_count': ('stats', 'viewTotalCount', {int_or_none}), 'like_count': ('stats', 'likeCount', {int_or_none}), diff --git a/yt_dlp/extractor/tver.py b/yt_dlp/extractor/tver.py index a8865fe64..f3daf8946 100644 --- a/yt_dlp/extractor/tver.py +++ b/yt_dlp/extractor/tver.py @@ -24,8 +24,6 @@ class TVerIE(InfoExtractor): 'channel': 'テレビ朝日', 'id': 'ep83nf3w4p', 'ext': 'mp4', - 'onair_label': '5月3日(火)放送分', - 'ext_title': '家事ヤロウ!!! 売り場席巻のチーズSP&財前直見×森泉親子の脱東京暮らし密着! テレビ朝日 5月3日(火)放送分', }, 'add_ie': ['BrightcoveNew'], }, { diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index 17d8424c4..a71a381e5 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -5333,7 +5333,7 @@ class FormatSorter: settings = { '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, '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',