# Universal Feed Parser

Parse RSS and Atom feeds in Python. 3000 unit tests. Open source.

- Download ·
- Documentation ·
- Unit tests ·
- Report a bug

## Atom 0.3

###

This is a sample Atom 0.3 feed, annotated with links that show how each value can be accessed once the feed is parsed.

Even though many of these elements are required according to the specification, real-world feeds may be missing any element. If an element is not present in the feed, it will not be present in the parsed results. You should not rely on any particular element being present.

### Example: Annotated Atom 0.3 feed

    <?xml version="1.0" encoding="utf-8"?>
    <feed version="0.3"
          xmlns="http://purl.org/atom/ns#"
          xml:base="http://example.org/"
          xml:lang="en">
      <title type="text/plain"
             mode="escaped">
        Sample Feed
      </title>
      <tagline type="text/html"
               mode="escaped">
        For documentation &lt;em&gt;only&lt;/em&gt;
      </tagline>
      <link rel="alternate"
            type="text/html"
            href="/"/>
      <copyright type="text/html"
                 mode="escaped">
        &lt;p>Copyright 2004, Mark Pilgrim&lt;/p>&lt;
      </copyright>
      <generator url="http://example.org/generator/"
                 version="3.0">
        Sample Toolkit
      </generator>
      <id>tag:feedparser.org,2004-04-20:/docs/examples/atom03.xml</id>
      <modified>2004-04-20T11:56:34Z</modified>
      <info type="application/xhtml+xml"
            mode="xml">
        <div xmlns="http://www.w3.org/1999/xhtml"><p>This is an Atom syndication feed.</p></div>
      </info>
      <entry>
        <title>First entry title</title>
        <link rel="alternate"
              type="text/html"
              href="/entry/3"/>
        <link rel="service.edit"
              type="application/atom+xml"
              title="Atom API entrypoint to edit this entry"
              href="/api/edit/3"/>
        <link rel="service.post"
              type="application/atom+xml"
              title="Atom API entrypoint to add comments to this entry"
              href="/api/comment/3"/>
        <id>tag:feedparser.org,2004-04-20:/docs/examples/atom03.xml:3</id>
        <created>2004-04-19T07:45:00Z</created>
        <issued>2004-04-20T00:23:47Z</issued>
        <modified>2004-04-20T11:56:34Z</modified>
        <author>
          <name>Mark Pilgrim</name>
          <url>http://diveintomark.org/</url>
          <email>mark@example.org</email>
        </author>
        <contributor>
          <name>Joe</name>
          <url>http://example.org/joe/</url>
          <email>joe@example.org</email>
        </contributor>
        <contributor>
          <name>Sam</name>
          <url>http://example.org/sam/</url>
          <email>sam@example.org</email>
        </contributor>
        <summary type="text/plain"
                 mode="escaped">
          Watch out for nasty tricks
        </summary>
        <content type="application/xhtml+xml"
                  mode="xml"
                  xml:base="http://example.org/entry/3"
                  xml:lang="en-US">
          <div xmlns="http://www.w3.org/1999/xhtml">Watch out for
          <span style="background-image: url(javascript:window.location='http://example.org/')">
          nasty tricks</span></div>
        </content>
      </entry>
    </feed>

← Atom 1.0
RSS 2.0 →