-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
All requests are now detected by Youtube as BOT #421
Comments
I suddenly ran into this issue too, even though the IPs are residential and everything was fine just half an hour ago. The library definitely needs cookie support, like |
Same here |
Yesterday I had started some tests related to headers, Cookies and IPs but I don't have time at the moment, if anyone discovers something let us know |
Do you know how it's done in them? |
Same here |
It took me two days to install the node on my Linux server, upgrade pytubefix to 8.12.0, use client=WEB, let node generate poToken, and download videos smoothly. |
The biggest challenge in installing node on Linux is upgrading GLIBC. The server was close to crash twice. |
I did a preliminary test, without poToken, with all possible clients and this is the result. Code to test with Pytubefix 8.12.0:
I run the code multiple times and the result is erratic. The clients ANDROID and WEB_EMBED always download the audio successfully. Here is the outcome of one of such runs:
|
Are you using proxies? |
Using ' client=WEB ' lets me download videos. |
Using |
It is not an error, but a warning as the message itself explains. |
Since this is active within the hour and closely related to a youtube search library question I can't seem to get an answer to, I'm gonna ask here and hope for the best: Is it possible to search for playlists without using the official Data v3 API and dev key? I have written several yt CLI search tools and used |
Hello @NannoSilver Test this PR and tell us the result: #425 |
No, my linux server is in Los Angeles.I use this server to download youtube videos and then fetch these videos from this server. |
I applied the modified files of #425 on Pytubefix 8.12.0. It is running in my production server and so far it is working very well. Thank you for fixing one more issue! |
Here is an additional feedback after a few days using the PR #425 on top of Pytubefix 8.12.0. The requests detected as BOT reduced massively, but some of my proxies detected by Youtube as bot remain blocked. |
As a temporary solution, disable this check in the check_availability function (
Oddly enough it works. Despite ignoring the error, the download continues |
Won't continuous requests end up in Youtube blocking your IP anyway? |
From experience, yes and no. Absolutely yes if your IP is a "known quantity" and they've had to take any kind of action on it or just had it flagged internally for whatever reason. Most people don't really understand that even using a VPN or proxy to smash the API isn't very effective in maintaining anonymity for a long list of fingerprinting reasons that Google has about you, not to mention most people are finger printed alongside various IPs their fingerprint has been seen with , etc. That said, if you do things above board and are using a real API key with a developer account, you get a shit load of leeway and a lot of abuse before an actual IP or account ban. Sure, you get rate-throttled and free accounts only get 10k or so request tokens (see also: does not mean 10k API calls) but even when you do stupid shit like I do with a free or paid account and fuck up a for loop in your method for hitting and parsing the API and use 10,000 tokens in 45 seconds, they don't give a fuck. You just come back tomorrow. |
Several days have passed, a dozen or two videos have been downloaded and nothing has been blocked. |
Initially, I was able to avoid BotDetection by changing the IP address, e.g. by temporarily switching off the VPN or changing the VPN server. In the meantime, this no longer helps. At least not immediately. I wait at least 1-2 hours and then the download starts again. I had the impression that the more often I download, the longer I have to wait. But this may also be due to my impatience and could therefore be more a feeling than a measurable fact. |
The problem started about 1 hour ago. All requests to download audio are detected as BOT, even at my local machine with a residential IP (never detected as bot before).
Here is the code to test the issue:
Output:
Looks like youtube found a way to detect pytubefix or they changed something else that is triggering the BOT exception.
Tested with:
Pytubefix 8.12.0
Python 3.9
Windows 11 and Ubuntu 20.04
The text was updated successfully, but these errors were encountered: