[kemonoparty] update default filenames and archive IDs (#1514)

Add an enumeration index so that attachments and regular files with the
same filename still get downloaded and not counted as duplicate files
(even though for patreon posts they usually are)

This invalidates all previously generated archive IDs.
To keep using old names and IDs, set
'filename' to "{id}_{title}_{filename}.{extension}" and
'archive-format' to "{service}_{user}_{id}_{filename}.{extension}".
This commit is contained in:
Mike Fährmann
2021-06-18 03:29:30 +02:00
parent fb4b4725ba
commit e9ab97396f

View File

@@ -20,8 +20,8 @@ class KemonopartyExtractor(Extractor):
category = "kemonoparty"
root = "https://kemono.party"
directory_fmt = ("{category}", "{service}", "{user}")
filename_fmt = "{id}_{title}_{filename}.{extension}"
archive_fmt = "{service}_{user}_{id}_{filename}.{extension}"
filename_fmt = "{id}_{title}_{num:>02}_{filename}.{extension}"
archive_fmt = "{service}_{user}_{id}_{num}"
def items(self):
find_inline = re.compile(r'src="(/inline/[^"]+)').findall