How to organize API call with a delay?

There are several functions that access the API through the right. Libu. The fact is that if you frequently go that you throw the sentry block - ban the IP the account that is using that IP you can't log on the account and the other will be able.
In short - like functions validate whether the user post/profile is subscribed to, etc.
How to implement these functions so that when a more or less large number of simultaneous queries(queries users make in the telegram bot) didn't block sentry?
Not as many threads to run async and await keywords don't really understand the implementation.
And, Yes, that would bypass the sentry block you need to put a delay between requests, at least 2 seconds.
March 23rd 20 at 19:26
2 answers
March 23rd 20 at 19:28
Firstly use a lot of proxies
Secondly what's stopping you from doing stupid sleep 2
To wait two seconds
If time.sleep then the bot does not react and on the other h - connie56 commented on March 23rd 20 at 19:31
@connie56, it is obvious that inspection should be kept separate from the bot separately - danielle_Halvorson commented on March 23rd 20 at 19:34
@danielle_Halvorson, but the data writes to verify the user. I have a stand-alone reference to kiwi, but how to make separate checks if you need to pass arguments? - connie56 commented on March 23rd 20 at 19:37
@connie56, what's stopping you to pass arguments? Well, except for religion, renounced it and just say - danielle_Halvorson commented on March 23rd 20 at 19:40
March 23rd 20 at 19:30
Send to a queue are processed in one stream and control timing in the memory (make the delay after the first it failed)

If it were straight
Wow, 've got the idea, and how to implement it directly in your code no(
What kind of place? threading / asyncio? thanks in advance for the answer - connie56 commented on March 23rd 20 at 19:33
@connie56, RabbitMQ and fight - heaven_Predovic commented on March 23rd 20 at 19:36

Find more questions by tags InstagramAPIPython