Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read all articles from a RSS feed?

I am using Python feedparser to read articles from a RSS feed. However, only the first page of articles can be read. Is there any other lib/package can read all articles of a RSS feed?

Similar question @ SO: Feedparser - retrieve old messages from Google Reader

like image 513
northtree Avatar asked Aug 10 '12 03:08

northtree


People also ask

How do I view RSS feeds in Chrome?

Enable the Follow Site RSS reader in Google ChromeOpen a new tab in Chrome. Type or copy-paste the following URL in the address box: chrome://flags/#following-feed-sidepanel . The experimental flags page will open to the "Following feed in the sidepanel" option. Select "Enabled" from the drop-down menu on the right.


1 Answers

The RSS itself has probably just the first page of data. You can access the original data from the 'link' attribute in the RSS item (at least that what it's called in feedparser). Something like:

feed = feedparser.parse('http://reddit.com/.rss')
for entry in feed['entries']:
    content = urlopen(entry['link']).read()
    # Do something with content
like image 92
lazy1 Avatar answered Oct 07 '22 22:10

lazy1