xavdid / reddit-user-to-sqlite

Pull Reddit user data into a SQLite database
https://pypi.org/project/reddit-user-to-sqlite/
MIT License
217 stars 9 forks source link

Tweak how rate limiting is handled #25

Closed xavdid closed 1 year ago

xavdid commented 1 year ago

Reddit has a new rate limiting approach. While this tool won't hit that often, it's good to handle it gracefully. Tweaks #24 to not throttle until we have to.

This PR is a little bigger than it needs to be because I did some linting and typing changes as well.

xavdid commented 1 year ago

Yours was great except that you approached it with the assumption that there was a "requests per second" limit. It's a common approach, but not the route Reddit took.

I appreciate the PR though, it was the motivation I needed to take a closer look.