Forums

Too Many Requests when using pytube

I have a site, where you enter an url and when you click download, it should download a video but instead I get this error

urllib.error.HTTPError: HTTP Error 429: Too Many Requests

is it possible to fix?

Yes. Make fewer requests to the site. They are rate-limiting you. In general, sites like youtube do not want you to be accessing them with programs, so they have mechanisms in place to prevent that.

Hiii I use pytube library and by mistake I make too many requests then I fixed the code and try again but it shows HTTP error 429 How can I fix this problem??

The only possible way to handle rate limits is to wait.