After Google Reader was shut down, I moved to NewsBlur to follow my RSS feeds. The great thing about NewsBlur is that you can add RSS feeds to a folder and Newsblur will merge all the stories under that folder into a single RSS feed.
Under NewsBlur, you’ll want to pull the folder RSS feed from the settings option:
The following Python code can pull the feed and iterate through it to find article information. At the bottom of this code example, each child represents a possible article, and sub_child represents a property on the article: the URL, the title, etc. I use a variant of this code to help identify important news stories.
import xml.etree.ElementTree as ET
import datetime, pytz
#tears through the newsblur folder xml searching for <entry> items
r = requests.get('NEWSBLUR_FOLDER_RSS')
if r.status_code != 200:
print("ERROR: Unable to retrieve address ")
xml = r.text
xml_root = ET.fromstring(xml)
#we search for <entry> tags because each entry tag stores a single article from a RSS feed
for child in xml_root:
if not child.tag.endswith("entry"):
#if we are down here, the tag is an entry tag and we need to parse out info
#Grind through the children of the <entry> tag
for sub_child in child:
if sub_child.tag.endswith("category"): #article categories
#call sub_child.get('term') to get categories of this article
elif sub_child.tag.endswith("title"): #article title
#call sub_child.text to get article title
elif sub_child.tag.endswith("summary"): #article summary
#call sub_child.text to get article summary
#call sub_child.get('href') to get article URL
After the closure of Google Reader – which I was a big fan of – I moved all of my RSS feeds to NewsBlur. One of the reasons I moved to NewsBlur is that it has a full API and is very easy to interface with!
For instance, folder feeds are available and don’t require authentication, making it easy for an app to merge multiple RSS feeds and treat them as one. For example: in NewsBlur, I’ve created a folder called economy and set up multiple feeds (New York Times, Forbes, Washington Post Business) underneath that folder, like so:
Right clicking the folder name and clicking folder settings pops up the folder settings tab. The URLs listed in the Feed Address section return a RSS list with all of the items from the feeds combined into a single feed. Even better: the URL supplied doesn’t require authentication, so an application can read it instead of having to poll 5 separate RSS feeds.