DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Matt has posted 1 posts at DZone. View Full User Profile

Feedburner Awareness API Script

  • submit to reddit
        lookup feedburner statistics for a Feedburner RSS feed.  Get the Reach, Circulation and hits including historical numbers.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2009 HalOtis Marketing
# written by Matt Warren
import urllib2
    from xml.etree import ElementTree
except ImportError:
    from elementtree import ElementTree
#add a dates=YYYY-MM-DD,YYYY-MM-DD argument to the url to get all data in a date range
url_prefix = ''
URIs = ['HalotisBlog',]
def print_feedburner(content):
    tree = ElementTree.fromstring(content)
    for feed in tree.findall('feed'):
        print feed.get('uri'), ':'
        for entry in feed.findall('entry'):
            print entry.get('date'), '-', entry.get('reach'), '-', entry.get('circulation'), '-', entry.get('hits')
if  __name__=='__main__':
    for uri in URIs:
        content = urllib2.urlopen(url_prefix + uri).read()