Xerbo / furaffinity-dl

FurAffinity Downloader, now with 100% more Python
BSD 3-Clause "New" or "Revised" License
91 stars 17 forks source link

Download stops on files with the incorrect extension #27

Closed catlover1019 closed 4 years ago

catlover1019 commented 4 years ago

What the title says, I keep on getting the error Error: Not a valid PNG (looks more like a JPEG) and the download stops. Even if I use the -p flag, the download stops in the same place, without printing the error message.

Just a note that because of the dumb way that it handles files, FA has tons of images with the wrong extension.

catlover1019 commented 4 years ago

Now, it seems to work with the -p flag, however I have a suggestions that should make it possible to still download metadata, plus, it would work for more than just jpg images and MP3 audio files. Have you considered foing what gallery-dl does where you write the metadata to a seperate text file with the same filename, besides the extension, of the actual submission file, or at least having this an an option? I admit I don't really know how you have everything set up, but I would think that such would be feasible. Sorry if there's something that would make it not work, or be too complicated to be worth it.

Xerbo commented 4 years ago

It wouldn't be too hard to do, you could just add something like this just before the existing metadata section: echo "Title: $title\nFilename: $file_name\nDescription: $description" > "$file.meta"

But honestly this project needs to be moved from bash to an actual programming language with a HTML parser.

catlover1019 commented 4 years ago

Well, that would probably take a while, and I'd love it if it was working in a useful way for now. I guess I'm not an invalid, and could easily add it myself. I just think it'd be nice as an actual supported feature.

catlover1019 commented 4 years ago

Thanks. That should work well. I actually decided to solve the problem a bit differently on my local copy, and just permanently download a copy of the "tempfile" for each submission, just so I could have everything, including the non-truncated description, tags, and comments to parse later myself if I so desired, and for posterity purposes. This should be fine for people who actually care about formatting, and not just saving everything possible like I do.