mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
[kemonoparty] fix KeyError for empty files (#5368)
This commit is contained in:
parent
c3bafd6a2b
commit
15a4bc2584
@ -156,7 +156,7 @@ class KemonopartyExtractor(Extractor):
|
|||||||
|
|
||||||
def _file(self, post):
|
def _file(self, post):
|
||||||
file = post["file"]
|
file = post["file"]
|
||||||
if not file:
|
if not file or "path" not in file:
|
||||||
return ()
|
return ()
|
||||||
file["type"] = "file"
|
file["type"] = "file"
|
||||||
return (file,)
|
return (file,)
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
__version__ = "1.26.9"
|
__version__ = "1.27.0-dev"
|
||||||
|
@ -248,6 +248,16 @@ __tests__ = (
|
|||||||
"published": "2022-07-29T21:12:11.483000",
|
"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",
|
"#url" : "https://kemono.su/discord/server/488668827274444803#608504710906904576",
|
||||||
"#category": ("", "kemonoparty", "discord"),
|
"#category": ("", "kemonoparty", "discord"),
|
||||||
|
Loading…
Reference in New Issue
Block a user