RSS Distractor

Screen Shot 2014-12-03 at 21.54.42

I’ve been working on a Processing sketch that reads Buzzfeed’s RSS feed and will use data from it to trigger real-world events. There have been a few hiccups along the way that are worth reporting on for the benefit of others working on similar projects.

It’s taken a while for me to work out that RSS posts are not always chronological. I initially tested with the BBC News ‘latest’ feed, which I expected to be a ‘breaking news’ feed. It’s actually editorialised, so the headline always comes first regardless of whether more recent stories have been posted.

Buzzfeed’s XML file seems to load unreliably, so I kept finding that the most recent story would disappear on the next check. Also, when they post updates, several stories will appear at once, and not always with the same timestamp (pubDate).

I’m trying to solve this by loading the whole XML file, then cycling through the item/pubDate elements and putting them into a string array. This then gets compared each check to see if anything new has shown up. Doing it this way will hopefully solve the problem of the disappearing new posts.