Universal feed parser, handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Project description
feedparser - Parse Atom and RSS feeds in Python.
feedparser is open source. See the LICENSE file for more information.
Installation
Feedparser can be installed using distutils or setuptools by running:
$ python setup.py install
If you’re using Python 3, feedparser will automatically be updated by the 2to3 tool; installation should be seamless across Python 2 and Python 3.
There’s one caveat, however: sgmllib.py was deprecated in Python 2.6 and is no longer included in the Python 3 standard library. Because feedparser currently relies on sgmllib.py to handle illformed feeds (among other things), it’s a useful library to have installed.
If your feedparser download included a copy of sgmllib.py, it’s probably called sgmllib3.py, and you can simply rename the file to sgmllib.py. It will not be automatically installed using the command above, so you will have to manually copy it to somewhere in your Python path.
If a copy of sgmllib.py was not included in your feedparser download, you can grab a copy from the Python 2 standard library (preferably from the Python 2.7 series) and run the 2to3 tool on it:
$ 2to3 -w sgmllib.py
If you copied sgmllib.py from a Python 2.6 or 2.7 installation you’ll additionally need to edit the resulting file to remove the warnpy3k lines at the top of the file. There should be four lines at the top of the file that you can delete.
Because sgmllib.py is a part of the Python codebase, it’s licensed under the Python Software Foundation License. You can find a copy of that license at python.org:
Documentation
The feedparser documentation is available on the web at:
It is also included in its source format, ReST, in the docs/ directory. To build the documentation you’ll need the Sphinx package, which is available at:
You can then build HTML pages using a command similar to:
$ sphinx-build -b html docs/ fpdocs
This will produce HTML documentation in the fpdocs/ directory.
Testing
Feedparser has an extensive test suite that has been growing for a decade. If you’d like to run the tests yourself, you can run the following command:
$ python feedparsertest.py
This will spawn an HTTP server that will listen on port 8097. The tests will fail if that port is in use.
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 Distributions
File details
Details for the file feedparser-5.1.2.zip
.
File metadata
- Download URL: feedparser-5.1.2.zip
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51fed26e7b0cce3c6e931182641c8607e21853225a66a3462f20f8e6ec93c83b |
|
MD5 | c300bc422dcc127d7ff7ef6847ee1ef5 |
|
BLAKE2b-256 | 93197e00bc543838e1e2fd7f8bb0bfab53f7afeff8c0514488958a0d97b814b9 |
Provenance
File details
Details for the file feedparser-5.1.2.tar.gz
.
File metadata
- Download URL: feedparser-5.1.2.tar.gz
- Upload date:
- Size: 284.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 183ddcf94b11648e710ef45ef8124386e315704a0247b073d375c7dd39b4cb7f |
|
MD5 | 575e76c64ec61016a83a015c65110606 |
|
BLAKE2b-256 | 519e06d2f7d2fbbabd0999f4ed3be9341db8ed37854808022439679671acfb67 |
Provenance
File details
Details for the file feedparser-5.1.2.tar.bz2
.
File metadata
- Download URL: feedparser-5.1.2.tar.bz2
- Upload date:
- Size: 199.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7773afb41481add990539baeb0e441811ec48cb8c1b6c2911cabbe9c5d9d1d0 |
|
MD5 | 9f88692c7c1af1d47839eb2025984975 |
|
BLAKE2b-256 | 660a81753cded45d437b643ce1e0addbad16d92438f2e599a24f10d12c1fe1d0 |