diff --git a/gallery_dl/extractor/kemonoparty.py b/gallery_dl/extractor/kemonoparty.py index d8c44fafae..e731e550d0 100644 --- a/gallery_dl/extractor/kemonoparty.py +++ b/gallery_dl/extractor/kemonoparty.py @@ -90,12 +90,19 @@ def items(self): post["username"] = username post["user_profile"] = profile if comments: - post["comments"] = self.api.creator_post_comments( - service, creator_id, post["id"]) + try: + post["comments"] = self.api.creator_post_comments( + service, creator_id, post["id"]) + except exception.HttpError: + post["comments"] = () if dms is not None: if dms is True: dms = self.api.creator_dms( post["service"], post["user"]) + try: + dms = dms["props"]["dms"] + except Exception: + dms = () post["dms"] = dms if announcements is not None: if announcements is True: diff --git a/test/results/kemonoparty.py b/test/results/kemonoparty.py index a9b66a8871..6a38845207 100644 --- a/test/results/kemonoparty.py +++ b/test/results/kemonoparty.py @@ -122,13 +122,24 @@ "#count" : 3, }, +{ + "#url" : "https://kemono.su/patreon/user/3161935/post/23445732", + "#comment" : "comments (#2008)", + "#category": ("", "kemonoparty", "patreon"), + "#class" : kemonoparty.KemonopartyPostExtractor, + "#options" : {"comments": True}, + + "comments": "len:12", +}, + { "#url" : "https://kemono.su/patreon/user/34134344/post/38129255", - "#comment" : "DMs (#2008)", + "#comment" : "DMs (#2008); no comments", "#category": ("", "kemonoparty", "patreon"), "#class" : kemonoparty.KemonopartyPostExtractor, - "#options" : {"dms": True}, + "#options" : {"dms": True, "comments": True}, + "comments": (), "dms": [ { "added" : "2021-07-31T02:47:51.327865",