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

HTTP request failed: 418 #431

Closed
marlekal opened this issue Sep 27, 2019 · 6 comments
Closed

HTTP request failed: 418 #431

marlekal opened this issue Sep 27, 2019 · 6 comments

Comments

@marlekal
Copy link

i'm using the --download-archive FILE command, so it starts checking the existing files but it stops halfway and it shows me this error:
[weibo][error] HTTP request failed: 418: for url: https://m.weibo.cn/api/container/getIndex

@wankio
Copy link
Contributor

wankio commented Sep 27, 2019

oh i dont know it supported weibo now, but when i'm testing with archive enabled, everything worked, no problem at all

@marlekal
Copy link
Author

i used it yesterday and it worked fine, it started resuming downloads right after checking the exsiting ones, today the folder got over 5000 files, it feels like it's getting overwhelmed while checking??

@mikf
Copy link
Owner

mikf commented Sep 27, 2019

The 418 HTTP status code is Weibo's way of saying "You are overusing our API". I don't know why they aren't using the default 429: Too Many Requests, but going through a user profile without actually downloading any files got me a 418 error as well after issuing something like 20-30 requests to https://m.weibo.cn/api/container/getIndex?page=...&containerid=... in only a few seconds. So if anything is overwhelmed, it's Weibo's API servers.

The problem now is resuming your download from were it left off. With the way things work at the moment, gallery-dl will always start at the beginning, skip over already downloaded files, and will eventually fail with the same error because it sent too many API requests in too short of a time while trying to get to where it previously was. The only way would be to manually modify the start page in the source code itself:

params = {"page": 1, "containerid": "107603" + self.user_id[-10:]}

Maybe a --start-page or --pages flag that works somewhat like --range would be a helpful addition ...

@wankio
Copy link
Contributor

wankio commented Sep 27, 2019

i'm using this https://github.com/nondanee/weiboPicDownloader with simultaneous download set to 2. maybe you can take a look.

@marlekal
Copy link
Author

when i set a range value it shows me the error immidiatly without even checking for existing files, but i did an attempt with a lower value on range and it did skip and searched untill it crashed.
I couldn't get the --start-page or --pages commands to works neither changing the page value on weibo.py file, i guess i'm doing it wrong

i'm using this https://github.com/nondanee/weiboPicDownloader with simultaneous download set to 2. maybe you can take a look.

thanks will do

@marlekal
Copy link
Author

marlekal commented Sep 27, 2019

here is how i made it work.
i made a lot of gaps by moving out about 100 files out of the folder in order to make gallery-dl download them again which will lower the amount of spam, that made it reach the point it stopped at yesterday and resumed the downloads.
thank you both for your time

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

3 participants