mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
10.76k stars 886 forks source link

gallery-dl skips fanbox images under the same name on kemono.party #1488

Closed RJFAC closed 3 years ago

RJFAC commented 3 years ago

Some fanbox posts on kemono.party have images under the same name : Untitled, result in gallery-dl skipping some images. For example: https://kemono.party/fanbox/user/17397496/post/2023585 This post has 2 images, but gallery-dl will only download one of them.

This one will be downloaded. https://kemono.party/files/fanbox/17397496/2023585/Untitled.jpe

And this one will be skipped. https://kemono.party/attachments/fanbox/17397496/2023585/Untitled.jpe

Skyofflad commented 3 years ago

1402

RJFAC commented 3 years ago

-o skip=enumerate works well, thanks a lot.

RJFAC commented 3 years ago

-o skip=enumerate works well, thanks a lot.

New issue here, is it possible to just rename the same name files while skipping duplicates? -o filenam="{id}_{title}_{num}_{filename}.{extension}"doesn't work. For the fanbox posts on kemono.party, two same name files will be under two different urls.

nisehime commented 3 years ago

is it possible to just rename the same name files while skipping duplicates?

Looks like you need the compare postprocessor.

{
    "extractor": {

        "kemonoparty": {
            "skip": false,
            "postprocessors": [{"name": "compare", "action": "enumerate"}]
        }
}

Put this in your config file and don't use -o skip=enumerate with it. But this will only work if the files with the same names are identical, which is not always the case despite them looking very similar visually

UPD: Or you mean skipping duplicates on redownloading post/artist URLs? In this case -o filenam="{id}_{title}_{num}_{filename}.{extension}" is just written wrong. It sould be -o extractor.kemonoparty.filename="{id}_{title}_{num}_{filename}.{extension}", or better put this in config file

{
    "extractor": {

        "kemonoparty": {
            "filename": "{id}_{title}_{num}_{filename}.{extension}"
        }
}

Don't use -o skip=enumerate with it.

RJFAC commented 3 years ago

-o extractor.kemonoparty.filename="{id}_{title}_{num}_{filename}.{extension}"Problem solved, thanks.