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

Skip some errors, but not 429 Too Many Request errors? #23510

Closed
danny-wu opened this issue Dec 25, 2019 · 7 comments
Closed

Skip some errors, but not 429 Too Many Request errors? #23510

danny-wu opened this issue Dec 25, 2019 · 7 comments

Comments

@danny-wu
Copy link

@danny-wu danny-wu commented Dec 25, 2019

I'm using youtube-dl to archive a few YouTube channels and playlists. Some of the playlists contain unavailable videos (e.g. deleted, made private, etc). I don't want the download of the playlist to stop because of such an error.

However, I don' t want to skip all errors, because doing so will skip 429 Too Many Requests. This is a rate limit put in place by YouTube. If I skip this error, Youtube-Dl can easily plow through 100 more videos hitting 429s right away, and in essence get my IP blocked for a long time.

Is there a way to specify skipping some errors, but not 429 too many requests?

Alternatively, can I ONLY skip video is unavailable, private, etc errors?

@sunxvogy
Copy link

@sunxvogy sunxvogy commented Dec 25, 2019

So do you mean the 429 Too Many Requests issues are caused by the "-i" parameter?

@danny-wu
Copy link
Author

@danny-wu danny-wu commented Dec 25, 2019

When you download too many videos, you get 429 Too Many Requests.

This is a temporary error if you wait for a few seconds, or sometimes, a couple of minutes.

However, if you pass -i, it continues trying to download videos immediately. Because attempts to download fail immediately and youtube-dl continues to trying the next video, this racks up a lot of downloads.

When you continue downloading despite a 429 Too Many Requests, you will get your IP banned for hours, days, or weeks. I have an IP that is now banned even after a week, due to leaving youtube-dl racking up errors for six hours or so.

@sunxvogy
Copy link

@sunxvogy sunxvogy commented Dec 25, 2019

When you download too many videos, you get 429 Too Many Requests.

This is a temporary error if you wait for a few seconds, or sometimes, a couple of minutes.

However, if you pass -i, it continues trying to download videos immediately. Because attempts to download fail immediately and youtube-dl continues to trying the next video, this racks up a lot of downloads.

When you continue downloading despite a 429 Too Many Requests, you will get your IP banned for hours, days, or weeks. I have an IP that is now banned even after a week, due to leaving youtube-dl racking up errors for six hours or so.

Thanks a lot!

@Panzer1119
Copy link

@Panzer1119 Panzer1119 commented Jan 3, 2020

I haven't downloaded any videos with youtube-dl today from youtube, but as i wanted to start it now, it told me multiple times "HTTP Error 429: Too Many Requests", but in the Browser i'm not banned from YouTube, also YouTube App is working on my phone in my WLAN, so what is going on? (i even tried the "--force-ipv4" argument)

Edit: Seams my IP was blocked or whatever, after i reconnected mit router (and got a new ip) everything worked fine again.
But if my IP would be blocked, then youtube shouldn't work in the browser either?
Hmm...

@GitItAgain
Copy link

@GitItAgain GitItAgain commented Jan 3, 2020

I'm having a similar issue with Error 429. I am going to try something from the "Workarounds" section of the Readme.md file:

--sleep-interval SECONDS Number of seconds to sleep before each
download when used alone or a lower bound
of a range for randomized sleep before each
download (minimum possible number of
seconds to sleep) when used along with
--max-sleep-interval.
--max-sleep-interval SECONDS Upper bound of a range for randomized sleep
before each download (maximum possible
number of seconds to sleep). Must only be
used along with --min-sleep-interval.

@sunxvogy
Copy link

@sunxvogy sunxvogy commented Jan 4, 2020

I haven't downloaded any videos with youtube-dl today from youtube, but as i wanted to start it now, it told me multiple times "HTTP Error 429: Too Many Requests", but in the Browser i'm not banned from YouTube, also YouTube App is working on my phone in my WLAN, so what is going on? (i even tried the "--force-ipv4" argument)

Edit: Seams my IP was blocked or whatever, after i reconnected mit router (and got a new ip) everything worked fine again.
But if my IP would be blocked, then youtube shouldn't work in the browser either?
Hmm...

I assume it would be YouTube blocks "something" + IP. It doesn't use the IP address only. Too strange.

@danny-wu
Copy link
Author

@danny-wu danny-wu commented Jan 4, 2020

YouTube has updated something. I get 429s now on a known good configuration.

I think they’re detecting YouTube-dl somehow, but still only rate limiting at a certain threshold to not trip casual use and also make counterdetection harderbb

@ytdl-org ytdl-org locked and limited conversation to collaborators Jan 9, 2020
@ytdl-org ytdl-org deleted a comment from wakproductions Jan 9, 2020
@dstftw dstftw closed this Mar 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.