GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • index
  • next
  • previous
  • feedparser 5.2.0 documentation
  • Advanced Features
  • Feed Type and Version Detection
  • Show Source

This view

  • Original page
  • New address

GeezerVison is showing pythonhosted.org — Feed Type and Version Detection — feedparser 5.2.0 documentation

Feed Type and Version Detection¶

Universal Feed Parser attempts to autodetect the type and version of the feeds it parses. There are many subtle and not-so-subtle differences between the different versions of RSS, and applications may choose to handle different feed types in different ways.

Accessing feed version¶

>>> d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml')
>>> d.version
'atom10'
>>> d = feedparser.parse('http://feedparser.org/docs/examples/atom03.xml')
>>> d.version
'atom03'
>>> d = feedparser.parse('http://feedparser.org/docs/examples/rss20.xml')
>>> d.version
'rss20'
>>> d = feedparser.parse('http://feedparser.org/docs/examples/rss20dc.xml')
>>> d.version
'rss20'
>>> d = feedparser.parse('http://feedparser.org/docs/examples/rss10.rdf')
>>> d.version
'rss10'

Here is the complete list of known feed types and versions that may be returned in version:

rss090
RSS 0.90
rss091n
Netscape RSS 0.91
rss091u
Userland RSS 0.91 (differences from Netscape RSS 0.91)
rss10
RSS 1.0
rss092
RSS 0.92
rss093
RSS 0.93
rss094
RSS 0.94 (no accurate specification is known to exist)
rss20
RSS 2.0
rss
RSS (unknown or unrecognized version)
atom01
Atom 0.1
atom02
Atom 0.2
atom03
Atom 0.3
atom10
Atom 1.0
atom
Atom (unknown or unrecognized version)
cdf
CDF

If the feed type is completely unknown, version will be an empty string.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.