diff --git a/gallery_dl/extractor/bluesky.py b/gallery_dl/extractor/bluesky.py index 78d1d661..e8c57077 100644 --- a/gallery_dl/extractor/bluesky.py +++ b/gallery_dl/extractor/bluesky.py @@ -150,9 +150,15 @@ class BlueskyExtractor(Extractor): if "images" in media: for image in media["images"]: - files.append(self._extract_media(image, "image")) + try: + files.append(self._extract_media(image, "image")) + except Exception: + pass if "video" in media and self.videos: - files.append(self._extract_media(media, "video")) + try: + files.append(self._extract_media(media, "video")) + except Exception: + pass post["count"] = len(files) return files diff --git a/test/results/bluesky.py b/test/results/bluesky.py index 208ead64..fed35261 100644 --- a/test/results/bluesky.py +++ b/test/results/bluesky.py @@ -364,7 +364,7 @@ __tests__ = ( }, "user": { "avatar" : "https://cdn.bsky.app/img/avatar/plain/did:plc:eclio37ymobqex2ncko63h4r/bafkreidvvqj5jymmpaeklwkpq6gi532el447mjy2yultuukypzqm5ohfju@jpeg", - "banner" : "https://cdn.bsky.app/img/banner/plain/did:plc:eclio37ymobqex2ncko63h4r/bafkreiaiorkgl6t2j5w3sf6nj37drvwuvriq3e3vqwf4yn3pchpwfbekta@jpeg", + "banner" : "https://cdn.bsky.app/img/banner/plain/did:plc:eclio37ymobqex2ncko63h4r/bafkreidlzzmt7sy2n6imz5mg7siygb3cy4e526nvbjucczeu5cutqro5ni@jpeg", "createdAt" : "2023-06-05T18:50:31.498Z", "description" : "In-depth, independent reporting to better understand the world, now on Bluesky. News tips? Share them here: http://nyti.ms/2FVHq9v", "did" : "did:plc:eclio37ymobqex2ncko63h4r", @@ -373,7 +373,7 @@ __tests__ = ( "followsCount" : int, "handle" : "nytimes.com", "instance" : "nytimes.com", - "indexedAt" : "2024-01-20T05:04:46.757Z", + "indexedAt" : "iso:datetime", "labels" : [], "postsCount" : int, }, @@ -443,6 +443,13 @@ __tests__ = ( "#class" : bluesky.BlueskyPostExtractor, }, +{ + "#url" : "https://bsky.app/profile/jacksonlab.bsky.social/post/3m2ms33o6p52k", + "#comment" : "'external' embed - 'images': [], 'video': null", + "#class" : bluesky.BlueskyPostExtractor, + "#count" : 0, +}, + { "#url" : "https://bsky.app/saved", "#class" : bluesky.BlueskyBookmarkExtractor,