AlphaSlayer1964 / kemono-dl

A simple kemono.party downloader using python.
504 stars 82 forks source link

Ignore 416 errors and archive the post #51

Closed user1872372839 closed 2 years ago

user1872372839 commented 2 years ago

Hello, I've been having a lot of 416 errors on several files, and due to those errors, the posts are not archived even after all files are downloaded.

Then, if I delete/modify one of the files from that download (e.g: delete the lower quality versions of a post with 5 videos), the download starts all over again, since the post was not archived.

Is it possible to make an option that ignores only 416 errors and archives posts that have this error?

AlphaSlayer1964 commented 2 years ago

So the thing is the 416 error occured when you request to download a byte range that exceeds what is actually on the server. That happens because kemono party has a bunch of incorrect hashes as file names and they don't care to fix them. When a file has an incorrect file hash the program tries to continue the download. I do this because kemono party has another issue, sometimes downloads can be so slow on their end that their server times out and you get an incomplete download. The thing is the requests module doesn't notify you that the download was incomplete so I have to use the hash to check completeness. I hoped after their "maintenance" that this would be fixed but it seems to still be an issue. I will post a release, probably today, that lets you ignore the 416 error but I recommend you also use '--verbose' and save all the direct file links that get this error and report them on their message board for having incorrect hashes. If you use coomer party, which uses the same backend, you will notice you never get that error because all of their file hashes are correct.

AlphaSlayer1964 commented 2 years ago

I have made the 416 error a warning in the latest release. If you get this warning please validate that the file has been downloaded correctly and report it to the sites message board for having an incorrect hash as the file name.