Feedparser Library

6.0.12 · active · verified Sun Apr 05

Feedparser is a Python library for downloading and parsing syndicated feeds, including RSS (0.9x, 1.0, 2.0), Atom (0.3, 1.0), CDF, and JSON feeds. It aims to normalize various feed types and versions into a consistent Python dictionary structure, simplifying feed processing. The current stable version is 6.0.12, and the project maintains an active release cadence with regular updates and fixes.

Warnings

Install

Imports

Quickstart

Parses a given feed URL and prints the feed title, the title of the first entry, and its link. It handles both RSS and Atom feeds, normalizing their structures.

import feedparser
import os

# Replace with a real RSS/Atom feed URL
feed_url = os.environ.get('FEED_URL', 'http://feedparser.org/docs/examples/atom10.xml')

d = feedparser.parse(feed_url)

print(f"Feed Title: {d.feed.title}")
if d.entries:
    first_entry = d.entries[0]
    print(f"First Entry Title: {first_entry.title}")
    print(f"First Entry Link: {first_entry.link}")
    if hasattr(first_entry, 'published_parsed'):
        print(f"First Entry Published: {first_entry.published_parsed}")

view raw JSON →