The new and improved Scoopbot

So I threw together an IRC bot (sig) for monitoring RSS feeds and announcing when new blog posts show up. A few years ago I had made one of these, but I seem to have misplaced the library it used for parsing RSS feeds. I started with the IRC bot structure found in Watchglass. I built a little function to pull out the stuff I wanted from the RSS feeds, so now I don't need that external library anymore.

Currently it just announces to all channels anything in the blog list. In the future I want to alter it so that it can take PM's to subscribe individually to feeds. If you have other ideas, please comment below. I also appreciate critiques of my code, whether it is something that I could have done more efficiently or if there is something that is just plain dumb.

Update: Had to change the program a little, I moved where it speaks the posts to a part of the loop that actually gets hit; it was hidden behind a 'continue' previously. Also changed the logic for storing the recent feeds to hold a few recent posts instead of just one, so that if the most recent post is deleted the program will still recognize the older posts and not report them as new.

Update 2: Added blog titles to the information parsed from the RSS and reported to IRC. Patch scoopbot_add_titles.vpatch (sig)

Tags:

Leave a Reply