KonradIT/parler-py-api

Bad Gateway & Too many requests

ExtraLime opened this issue · 2 comments

Hey nice library, I modified it a little and kept running into response 502 (bad gate way) and 429 (too many requests). I have written a static response handler that checks the response code, then sleeps for 5 seconds upon encountering one of the responses above. After the res is passed through the handler, it returns the res from where it was called, at which point the call is made again or the script continues. I would request to pull, however the response handler requires a rewrite of the other methods. Feel free to close this issue ASAP.

Hi, that's super neat! I have written some code to mitigate this sort of stuff but haven't uploaded. Feel free to PR, and I'll do any clean up if necessary.

Great, thanks.