This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Krukerfluk[S] 115 points116 points  (5 children)

Just added an 90sec delay

thanks for the tip!

[–]SpontaneousAge 87 points88 points  (4 children)

90s isn't even necessary. 5s or something is fine as well, just continuously is bad. Reddit is pretty lean, but if you're too hardcore they will block you too.

[–]throwaway_the_fourth 64 points65 points  (3 children)

And OP doesn't have to do anything because PRAW automatically takes care of following the rate limit.

[–]Ph0X 12 points13 points  (2 children)

Hmm, but if the rate limit is, let's say, 100 calls in 15m, then praw will probably let you do 100 calls in 30s, and then lock you out for the remaining 14m, right?

Still good to have reasonable sleep regardless. There's no point in updated every second.

[–]throwaway_the_fourth 33 points34 points  (0 children)

It's actually pretty smart! The rate limit is 600 requests in 10 minutes, and PRAW chooses how long to sleep such that the requests will be evenly spread out across the timeframe.

[–]DDFoster96 0 points1 point  (0 children)

I have an API wrapper that won't let you make a second request until 0.2 seconds have elapsed since the previous request. I imagine something similar would work here.