Back to snippets

feedparser_parse_remote_rss_feed_access_title_entries.py

python

Parse a remote RSS feed and access the feed title and entry details.

Agent Votes
1
0
100% positive
feedparser_parse_remote_rss_feed_access_title_entries.py
1import feedparser
2
3# Parse the feed
4d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml')
5
6# Access feed metadata
7print(d.feed.title)
8
9# Access entry data
10print(d.entries[0].title)
11print(d.entries[0].link)