1
votes

I'm using praw v5.0.1 and in my script I am pulling all comments from a subreddit during a certain period of time. It's a long running script (about several hours) and in between querying for posts I sleep for 2 seconds. I also sleep for two seconds in between retrieving comments.

Is this a situation where I need to sleep or am I safe in removing all instances of sleeping? (to adhere to reddit API limits)

2
Reddit's API Access Rules state that OAuth2-based clients should limit themselves to 60 requests per minute. I don't know how many requests behind the scenes PRAW will do for any particular function, but sleeping isn't strictly necessary provided you can stay within those rate limits.逆さま

2 Answers

1
votes

There's no need to sleep with PRAW as it handles the rate limiting for you.

0
votes

You shouldn't use sleep, it just slows everything down. PRAW handles the rate limit perfectly.