[twibooru] fix posts without 'name' (fixes #2434)

pull/2439/head
Mike Fährmann 3 years ago
parent 40ce505420
commit 42f2fd2ed7
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -36,8 +36,9 @@ class TwibooruExtractor(BooruExtractor):
post["date"] = text.parse_datetime( post["date"] = text.parse_datetime(
post["created_at"], "%Y-%m-%dT%H:%M:%S.%fZ") post["created_at"], "%Y-%m-%dT%H:%M:%S.%fZ")
name, sep, rest = post["name"].rpartition(".") if "name" in post:
post["filename"] = name if sep else rest name, sep, rest = post["name"].rpartition(".")
post["filename"] = name if sep else rest
class TwibooruPostExtractor(TwibooruExtractor): class TwibooruPostExtractor(TwibooruExtractor):

Loading…
Cancel
Save