I made a bot which fixes indirect imgur links
I hate the imgur comments page. I greatly prefer just viewing the direct image when I view a linked image on imgur. So I made this bot to fix the terrible load times and the unpleasant congested view of the image.
Posted May 14, 2016, 6:18 PM UTC
107
Instead of just getting the last 100 comments/submissions, I think you should just store the IDs of the last comment and submission you've seen, and then in your next iteration go back as far as you can in new comments/submissions until you hit an id you recognize.
Also, I think your bot would be greatly simplified by using the praw.helpers comment_stream and submission_stream objects. This would provide you with a generator that wouldn't exit, so you'd have to run two separate bots: one for comments and one for submissions. I think it would still make your life a lot easier though.
If you haven't already seen it, you might find this tutorial helpful: https://praw.readthedocs.io/en/stable/pages/call_and_response_bot.html