简体   繁体   中英

googletrans api - 429 Too Many Requests - workaround?

I have been using the unofficial googletrans API for a while now. Other than using the official API , could anyone suggest to me some workaround for using the unofficial API with less 429 exception? Any tricks so that I could make more requests with the API without getting 429 exception?

429 (too many requests) exceptions occur because the server most likely has throttling enabled. This is not something that you can change on the client side. You're simply "overloading" the server with requests and it is therefor stopping you at the gate. This is a very common tactic used by service providers to prevent you from taking too much of their processing power and/or data.

In order to be less effected by the 429 on your side you could try to spread the requests more evenly. Usually throttling allows your X requests per Y time. If you can find those numbers and spread the load evenly you should have less 429 errors.

The best solution as you already mentioned yourself is to simply use their official API and plan.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM