Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem about checking downloaded files' integrity #23

Open
amamiya-yuuko-1225 opened this issue Nov 13, 2023 · 2 comments
Open

Problem about checking downloaded files' integrity #23

amamiya-yuuko-1225 opened this issue Nov 13, 2023 · 2 comments
Assignees

Comments

@amamiya-yuuko-1225
Copy link
Contributor

amamiya-yuuko-1225 commented Nov 13, 2023

As I noticed, the script uses the http status code returned from cURL to identify whether a file is successfully downloaded.

if [[ "$http_return_code" == "416" ]] || [[ "$http_return_code" == "200" ]]; then
    add-downloaded-id "$videoid";

However, when cURL ends up with an error
curl: (92) HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
It returns 200 even the file is not successfully downloaded.

屏幕截图 2023-11-12 233513

I am not very familiar with shell scripts and commands, so I am wondering if you have a better way to solve this problem.

As for now , I mannually copy the progress bar of cURL and check download integrity, since I don't know how to read the progress bar in commands or write them to files. It maybe a feasbile way to solve this issue if you can get the message in progress bar.

What's more, the '.file.size' argument in $video_stat got in function iwara-dl-by-videoid is not reliable. I don't know why there is difference between the actual size and the one provided by API. Maybe it's useful if you know the correlation between these 2 figures.

Thanks a lot.

Best regards,

@hare1039 hare1039 self-assigned this Nov 15, 2023
@hare1039
Copy link
Owner

Thanks @amamiya-yuuko-1225 . I'll look into this tonight.
Can you provide the video id that has this problem?

@hare1039
Copy link
Owner

@amamiya-yuuko-1225 As a follow-up, I tried to download the ID shown in your screenshot. However, I cannot reproduce the result you got.

And after a quick search, maybe you can add --http1.1 to the curl download, forcing curl to download in HTTP 1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants