Skip to content
Parse OPML, RDF+FOAF, and iGoogle subscription lists
Python
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docs update the documentation
listparser use a relative import syntax
tests Use absolute URLs in the HTTP redirect tests
.gitignore exclude all jython cache files
COPYING Initial commit
COPYING.LESSER Initial commit
MANIFEST.in adjust the manifest now that the readme's renamed
NEWS
README.rst update the documentation
lptest.py split listparser code into separate files
project.opml
setup.py update the documentation
tox.ini add a tox file

README.rst

What is listparser?

listparser is a Python module that parses subscription lists (also called reading lists) and returns all of the feeds and subscription lists that it finds. It supports OPML, RDF+FOAF, and the iGoogle exported settings format, and runs in Python 2.5 through Python 3.5, Jython, and PyPy.

listparser is licensed under the terms of the GNU Lesser General Public License version 3 or higher.

Usage

>>> import listparser
>>> result = listparser.parse('project.opml')

A dictionary will be returned with several keys:

  • meta: a dictionary of information about the subscription list
  • feeds: a list of feeds
  • lists: a list of subscription lists
  • version: a file format identifier
  • bozo: 1 if there is a problem with the list, 0 otherwise
  • bozo_exception: (if bozo is 1) a description of the problem

Continuing the example:

>>> result.meta.title
u'listparser project feeds'
>>> len(result.feeds)
2
>>> result.feeds[0].url
u'http://kurtmckee.livejournal.com/data/atom?tag=listparser'

More extensive documentation is available in the docs/ directory, or online at <https://pythonhosted.org/listparser/>.

Bugs

There are going to be bugs. The best way to handle them will be to isolate the simplest possible document that susses out the bug, add that document as a test case, and then find and fix the problem.

...you can also just report the bug and leave it to someone else to fix the problem, but that won't be as much fun for you!

Bugs can be reported at <http://github.com/kurtmckee/listparser/issues>.

Something went wrong with that request. Please try again.