Sibusten / derpibooru-downloader

A downloader for imageboards running Philomena, such as Derpibooru.
MIT License
62 stars 6 forks source link

Program not downloading certain pics #28

Open Scarletvye opened 4 years ago

Scarletvye commented 4 years ago

If I use {name}.{ext} for this picture https://derpibooru.org/931457, the program will not download it. This has to do with the :| tag, because ":" and "|" are not accepted characters in filenames on Windows. Saving the pic from the website directly will not add that tag to the file's name, can this also be implemented for your program?

Edit: if I set the download filter to :| specifically, 359 images are detected, but by the end only 20 pics are actually saved.

Sibusten commented 4 years ago

I will look into this

CloudSnowPony commented 4 years ago

I don't have derpibooru working without a VPN. And the program doesn't want to download art. What to do???

Sibusten commented 4 years ago

The original issue does not seem to be a problem anymore. I can download image 931457 and the others from the :| tag without issue.

@CloudSnowPony Please open a new issue for your problem

Scarletvye commented 4 years ago

@Sibusten I am sorry to reopen the issue, but I just got to testing this again. I am using version 2.1.0 and files are still not being saved.

Again, I am testing by doing the following:

On Windows 10 x64, latest version. Download path is: Downloads/Test/{name}.{ext} Target is the :| tag with the Everything filter Detected 386 pics. Only 95 are saved. No errors or warnings. If I download multiple times the program skips the 95 images I have, but still works trough the rest, even though they are not being saved.

If I switch to {id}.{ext} all images are saved, and the program successfully skips all of them.

Can this program be compiled on Linux? I am willing to try and verify if this is Windows refusing to save the | and : symbols.

Scarletvye commented 4 years ago

@Sibusten

I ran the same profile in the cmd version, and for the pics that are not saved, this is the output:

QIODevice::write (QFile, "Downloads\Test\41983__safe_artist-colon-dazkominuette-colon-|_ask+doctor+colgate_bloodshot+eyes_dialogue_female_floppy+ears_frown_humanized_human+ponidox_laughing.png.temp"): device not open

Sibusten commented 4 years ago

Interesting, I'm having that problem now as well. It seems some of the filenames are "percent encoded", while others have the invalid character.

2347598 saves as 2347598__safe_artist-colon-lunaticgod_pony_-colon-7C_bust_meme_ponified+meme_simple+background_solo_transparent+background.png, where -colon-7C is :|

This seems to be an issue with how Derpibooru generates filenames. I'll add sanitization to avoid it.