diff --git a/gallery_dl/extractor/kemonoparty.py b/gallery_dl/extractor/kemonoparty.py index 9c77b7a7..f82bb33d 100644 --- a/gallery_dl/extractor/kemonoparty.py +++ b/gallery_dl/extractor/kemonoparty.py @@ -156,7 +156,7 @@ class KemonopartyExtractor(Extractor): def _file(self, post): file = post["file"] - if not file: + if not file or "path" not in file: return () file["type"] = "file" return (file,) diff --git a/gallery_dl/version.py b/gallery_dl/version.py index d438ba4d..ab8df335 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,4 +6,4 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "1.26.9" +__version__ = "1.27.0-dev" diff --git a/test/results/kemonoparty.py b/test/results/kemonoparty.py index b855e6cc..7cc62d34 100644 --- a/test/results/kemonoparty.py +++ b/test/results/kemonoparty.py @@ -248,6 +248,16 @@ __tests__ = ( "published": "2022-07-29T21:12:11.483000", }, +{ + "#url" : "https://kemono.su/gumroad/user/3267960360326/post/jwwag", + "#comment" : "empty 'file' with no 'path' (#5368)", + "#category": ("", "kemonoparty", "gumroad"), + "#class" : kemonoparty.KemonopartyPostExtractor, + "#count" : 8, + + "type" : "attachment", +}, + { "#url" : "https://kemono.su/discord/server/488668827274444803#608504710906904576", "#category": ("", "kemonoparty", "discord"),