-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 Error 429: Too Many Requests #601
Comments
I have the same question, did you solve it? |
Same Problem. |
Waiting for the solution |
@ZD511 @AliAkhtari78 @bigsandip Me and @arslandogar were discussing this issue here, I was not able to replicate the behaviour on my machine, and was not able to solve it. Just a few questions that would be helpful if you could answer:
I would recommend you all uninstall pytube completely, make sure it is uninstalled, then install pytube3 and try again. It is best actually if you can create a virtual environment and run
inside that virtual environment. I hope I can get this working for all of you. |
On localserver it always works but not on live website.I heard this happens because youtube blocked my ip address. Is it true? |
I solved it by 'pip uninstall pytube', 'pip uninstall pytube3' and change IP, and I think the main problem is IP been banned. |
@ZD511 I am glad to hear it! Did you change your IP by resetting the router? Or did you contact your ISP or use a VPN? I hope this will work for everyone else, thank you. |
i fixed this error with add cookies for browser ( Firefox, Chrome ) to request |
I have the same problem so I tried @alaaprog's solution but now I get the following error. Can someone help me? |
@G060N0FF this lib browser_cookie3 need brwoser like firefox or chrome to get cookies from it |
Yeah but how exactly do I get them? Sorry I am not very good with this technology. |
Ah nevermind, I saw that my Cookie file corrupted so I deleted it and created a new one, now everything is working fine. Thanks! |
Is there any solution for this please, the issue is still there as at 9th July 2020. since March 26, there hasnt been any clear solution. Please if you know how to prevent Youtube from Banning IP Address, kindly let us know. |
Thanks for your help, I solved the problem by doing just like you. |
I have the same BrowserCookieError, could you please tell me how you solved this problem? Thank you. |
Ok, if the issue is fixed by setting up cookies, how can I do it in servers like heroku? |
Hi @arslandogar , @infinity-plus , @shihyuuuuuuu @shocklet @godfrednanaowusu Am closing issue as it has been quite a while -- feel free to reopen if this issue still exists 😄 Thanks |
Your IP has been locked for 24h that's why u have http err 429 |
File "/home/youtubbb/.local/lib/python3.9/site-packages/pytube/request.py", line 55, in get How can I fix this? |
Hey @Teemo15 -- please create a new issue in order to keep this one on topic :-) |
This piece of code
from pytube import YouTube
yt = YouTube('https://www.youtube.com/watch?v=tPEE9ZwTmy0')
Throws this error:
Traceback (most recent call last):
File "test.py", line 2, in
yt = YouTube('https://www.youtube.com/watch?v=tPEE9ZwTmy0')
File "/home/user/.local/lib/python3.6/site-packages/pytube/main.py", line 91, in init
self.prefetch()
File "/home/user/.local/lib/python3.6/site-packages/pytube/main.py", line 162, in prefetch
self.watch_html = request.get(url=self.watch_url)
File "/home/user/.local/lib/python3.6/site-packages/pytube/request.py", line 36, in get
return _execute_request(url).read().decode("utf-8")
File "/home/user/.local/lib/python3.6/site-packages/pytube/request.py", line 24, in _execute_request
return urlopen(request) # nosec
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 564, in error
result = self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 756, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 429: Too Many Requests
The text was updated successfully, but these errors were encountered: