Skip to main content

rssfeed

A simple rss/atom/opml parser

Installation

pip install rssfeed

Get Started

rss parse

import requests
import rssfeed

text = requests.get("https://lobste.rs/rss").text
rssfeed.parse(text)
{
    "name": "Lobsters",
    "lastupdate": 1739824193,
    "items": [
        {
            "title": "Why I'm Writing a Scheme Implementation in 2025 (The Answer is Async Rust)",
            "author": "maplant.com by mplant",
            "timestamp": 1739824193,
            "url": "https://maplant.com/2025-02-17-Why-I'm-Writing-a-Scheme-Implementation-in-2025-(The-Answer-is-Async-Rust).html",
            "content": "<p><a href=\"https://lobste.rs/s/zm1g8r/why_i_m_writing_scheme_implementation\">Comments</a></p>"
        },
        {
            "title": "14 years of systemd",
            "author": "lwn.net via calvin",
            "timestamp": 1739814564,
            "url": "https://lwn.net/SubscriberLink/1008721/7c31808d76480012/",
            "content": "<p><a href=\"https://lobste.rs/s/c6rk0l/14_years_systemd\">Comments</a></p>"
        },
        {
            "title": "Making the Web More Readable With Stylus",
            "author": "wezm.net by wezm",
            "timestamp": 1739757928,
            "url": "https://www.wezm.net/v2/posts/2025/stylus/",
            "content": "<p><a href=\"https://lobste.rs/s/sag0p3/making_web_more_readable_with_stylus\">Comments</a></p>"
        }
    ]
}

rssfeed does not escape HTML tags, which means you had to sanitization content otherwise it may lead to Cross-site scripting attacks, a recommended choice is nh3.

opml parse

import rssfeed
opml = """
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
  <head>
    <title>demo feeds</title>
  </head>
  <body>
    <outline text="news">
      <outline text="奇客Solidot" xmlUrl="https://www.solidot.org/index.rss" type="rss" />
      <outline text="news-submenu">
        <outline text="Lobsters" xmlUrl="https://lobste.rs/rss" type="rss" />
      </outline>
    </outline>
    <outline text="阮一峰的网络日志" xmlUrl="https://feeds.feedburner.com/ruanyifeng" type="rss" />
  </body>
</opml>
"""
rssfeed.opmlParse(opml)
{
    "default": [
        {
            "name": "阮一峰的网络日志",
            "url": "https://feeds.feedburner.com/ruanyifeng"
        }
    ],
    "news": [
        {
            "name": "奇客Solidot",
            "url": "https://www.solidot.org/index.rss"
        },
        {
            "name": "Lobsters",
            "url": "https://lobste.rs/rss"
        }
    ]
}

Metadata

Release files for rssfeed 0.4.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rssfeed 0.4.5
File Size Uploaded
rssfeed-0.4.5.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rssfeed 0.4.5
File Interpreter ABI Platform
rssfeed-0.4.5-py3-none-any.whl Python 3 none any Details

Total release size: 31.5 kB

Release files / rssfeed-0.4.5.tar.gz

Download URL rssfeed-0.4.5.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cffa22cd1e9bdb60834e9dbd867ced527f3f4b4b8b6660dcbb24ed003ea535ce
BLAKE2b-256 checksum
How to use checksums
3af1dee547cab18ae4709d99c762d9b243477022ed897fb69d2b5bb1b2747633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / rssfeed-0.4.5-py3-none-any.whl

Download URL rssfeed-0.4.5-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12dad461ecace27c785f6e44ae5f9db86ac03d96ee0fe0615c6f72740dc99515
BLAKE2b-256 checksum
How to use checksums
6652b8154736b06b39818e940595499a396309d14a447c79b5012fd4195a79e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.5.0

2 release files

This release

0.4.5 This release

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page