How to read all articles from a RSS feed?
Asked Answered
F

1

7

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

Fortin answered 10/8, 2012 at 3:35 Comment(0)
W
10

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
Withhold answered 10/8, 2012 at 4:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.