Typed pythonic RSS parser
Project description
Rss parser
About
rss-parser
is typed python RSS parsing module built using BeautifulSoup
and pydantic
Installation
pip install rss-parser
or
git clone https://github.com/dhvcc/rss-parser.git
cd rss-parser
pip install .
Usage
from rss_parser import Parser
from requests import get
rss_url = "https://feedforall.com/sample.xml"
xml = get(rss_url)
# Limit feed output to 5 items
# To disable limit simply do not provide the argument or use None
parser = Parser(xml=xml.content, limit=5)
feed = parser.parse()
# Print out feed meta data
print(feed.language)
print(feed.version)
# Iteratively print feed items
for item in feed.feed:
print(item.title)
print(item.description)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Install dependencies with poetry install
(pip install poetry
)
pre-commit
usage is highly recommended. To install hooks run
poetry run pre-commit install -t=pre-commit -t=pre-push
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rss-parser-0.2.4.tar.gz
(17.0 kB
view hashes)
Built Distribution
rss_parser-0.2.4-py3-none-any.whl
(17.0 kB
view hashes)
Close
Hashes for rss_parser-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 918c2f662838850fd902123e3955ab3d3be3aae8c463c5376a8aadd5ba9b213c |
|
MD5 | 055b19224ba99bddd7d90e00aacd3462 |
|
BLAKE2b-256 | f780bd6d254694a5a9fe5cf2e7c39e916c7642e35edb9048b883d0048b0ba52a |