| Name | rssfeed JSON |
| Version |
0.4.2
JSON |
| download |
| home_page | None |
| Summary | A simple rss/atom feed parser |
| upload_time | 2025-10-06 04:39:19 |
| maintainer | None |
| docs_url | None |
| author | p7e4 |
| requires_python | >=3.12 |
| license | GPLv3 |
| keywords |
rssfeed
rss
feed
atom
opml
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# rssfeed
A simple rss/atom/opml parser
## Installation
`pip install rssfeed`
## Get Started
### rss parse
``` python
import requests
import rssfeed
text = requests.get("https://lobste.rs/rss").text
rssfeed.parse(text)
```
``` json
{
"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](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) attacks, a recommended choice is [nh3](https://github.com/messense/nh3).
### opml parse
``` python
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)
````
``` json
{
"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"
}
]
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "rssfeed",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "rssfeed, rss, feed, atom, opml",
"author": "p7e4",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/a4/ec/48a1f79e314879f9214fd365be8532dafe601a9a45f789625fbfadc52ea2/rssfeed-0.4.2.tar.gz",
"platform": null,
"description": "# rssfeed\n\nA simple rss/atom/opml parser\n\n## Installation\n\n`pip install rssfeed`\n\n\n## Get Started\n\n### rss parse\n\n``` python\nimport requests\nimport rssfeed\n\ntext = requests.get(\"https://lobste.rs/rss\").text\nrssfeed.parse(text)\n```\n\n``` json\n{\n \"name\": \"Lobsters\",\n \"lastupdate\": 1739824193,\n \"items\": [\n {\n \"title\": \"Why I'm Writing a Scheme Implementation in 2025 (The Answer is Async Rust)\",\n \"author\": \"maplant.com by mplant\",\n \"timestamp\": 1739824193,\n \"url\": \"https://maplant.com/2025-02-17-Why-I'm-Writing-a-Scheme-Implementation-in-2025-(The-Answer-is-Async-Rust).html\",\n \"content\": \"<p><a href=\\\"https://lobste.rs/s/zm1g8r/why_i_m_writing_scheme_implementation\\\">Comments</a></p>\"\n },\n {\n \"title\": \"14 years of systemd\",\n \"author\": \"lwn.net via calvin\",\n \"timestamp\": 1739814564,\n \"url\": \"https://lwn.net/SubscriberLink/1008721/7c31808d76480012/\",\n \"content\": \"<p><a href=\\\"https://lobste.rs/s/c6rk0l/14_years_systemd\\\">Comments</a></p>\"\n },\n {\n \"title\": \"Making the Web More Readable With Stylus\",\n \"author\": \"wezm.net by wezm\",\n \"timestamp\": 1739757928,\n \"url\": \"https://www.wezm.net/v2/posts/2025/stylus/\",\n \"content\": \"<p><a href=\\\"https://lobste.rs/s/sag0p3/making_web_more_readable_with_stylus\\\">Comments</a></p>\"\n }\n ]\n}\n```\n\n> rssfeed **does not** escape HTML tags, which means you had to sanitization content otherwise it may lead to [Cross-site scripting](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) attacks, a recommended choice is [nh3](https://github.com/messense/nh3).\n\n\n### opml parse\n\n``` python\nimport rssfeed\nopml = \"\"\"\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<opml version=\"1.0\">\n <head>\n <title>demo feeds</title>\n </head>\n <body>\n <outline text=\"news\">\n <outline text=\"\u5947\u5ba2Solidot\" xmlUrl=\"https://www.solidot.org/index.rss\" type=\"rss\" />\n <outline text=\"news-submenu\">\n <outline text=\"Lobsters\" xmlUrl=\"https://lobste.rs/rss\" type=\"rss\" />\n </outline>\n </outline>\n <outline text=\"\u962e\u4e00\u5cf0\u7684\u7f51\u7edc\u65e5\u5fd7\" xmlUrl=\"https://feeds.feedburner.com/ruanyifeng\" type=\"rss\" />\n </body>\n</opml>\n\"\"\"\nrssfeed.opmlParse(opml)\n````\n\n``` json\n{\n \"default\": [\n {\n \"name\": \"\u962e\u4e00\u5cf0\u7684\u7f51\u7edc\u65e5\u5fd7\",\n \"url\": \"https://feeds.feedburner.com/ruanyifeng\"\n }\n ],\n \"news\": [\n {\n \"name\": \"\u5947\u5ba2Solidot\",\n \"url\": \"https://www.solidot.org/index.rss\"\n },\n {\n \"name\": \"Lobsters\",\n \"url\": \"https://lobste.rs/rss\"\n }\n ]\n}\n```\n\n\n\n\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "A simple rss/atom feed parser",
"version": "0.4.2",
"project_urls": {
"Issues": "https://github.com/p7e4/rssfeed/issues",
"Repository": "https://github.com/p7e4/rssfeed"
},
"split_keywords": [
"rssfeed",
" rss",
" feed",
" atom",
" opml"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "09c857cb2e31f9ba6d7b22282a1c57514bfb31e2ac5b0a86132537357fac3c39",
"md5": "5fa1fb947a28aaff35fd1a32d9e41f3a",
"sha256": "817e024201d96d245a069a41a15d242d5eb86527ff6833d934cc031e119feb90"
},
"downloads": -1,
"filename": "rssfeed-0.4.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5fa1fb947a28aaff35fd1a32d9e41f3a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 16003,
"upload_time": "2025-10-06T04:39:18",
"upload_time_iso_8601": "2025-10-06T04:39:18.583957Z",
"url": "https://files.pythonhosted.org/packages/09/c8/57cb2e31f9ba6d7b22282a1c57514bfb31e2ac5b0a86132537357fac3c39/rssfeed-0.4.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a4ec48a1f79e314879f9214fd365be8532dafe601a9a45f789625fbfadc52ea2",
"md5": "3d9fb5d8fe46e6142a0c1d9b88bd527a",
"sha256": "69a08df82cf116616c58cb3a6b537e2474151910d727749fa99524fbe62b35fa"
},
"downloads": -1,
"filename": "rssfeed-0.4.2.tar.gz",
"has_sig": false,
"md5_digest": "3d9fb5d8fe46e6142a0c1d9b88bd527a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 15279,
"upload_time": "2025-10-06T04:39:19",
"upload_time_iso_8601": "2025-10-06T04:39:19.727335Z",
"url": "https://files.pythonhosted.org/packages/a4/ec/48a1f79e314879f9214fd365be8532dafe601a9a45f789625fbfadc52ea2/rssfeed-0.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-06 04:39:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "p7e4",
"github_project": "rssfeed",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "rssfeed"
}