diff options
author | sepro <sepro@sepr0.com> | 2025-01-26 04:32:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-26 03:32:10 +0000 |
commit | 3b4531934465580be22937fecbb6e1a3a9e2334f (patch) | |
tree | f7f077bb1cc17834b63321487872c15a737b9088 /yt_dlp/extractor/bluesky.py | |
parent | 421bc72103d1faed473a451299cd17d6abb433bb (diff) |
[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>
Diffstat (limited to 'yt_dlp/extractor/bluesky.py')
-rw-r--r-- | yt_dlp/extractor/bluesky.py | 14 |
1 files changed, 8 insertions, 6 deletions
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)) |