Skip to content

Instantly share code, notes, and snippets.

@simonwhitaker
Created April 25, 2012 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonwhitaker/2493483 to your computer and use it in GitHub Desktop.
Save simonwhitaker/2493483 to your computer and use it in GitHub Desktop.
Find top-selling apps with com.yourcompany.* bundle IDs.
# A simple Python script to find top-selling iOS apps with bundle IDs
# starting with the default 'com.yourcompany'. Guaranteed lulz!
from xml.dom.minidom import parse
from urllib2 import urlopen
# Substitute topfreeapplications for toppaidapplications to query paid apps
# Substitute gb for other country codes (us, ca, fr, etc...)
url = 'http://itunes.apple.com/gb/rss/topfreeapplications/limit=300/xml'
dom = parse(urlopen(url))
for app in dom.getElementsByTagName('entry'):
bundle_id = app.getElementsByTagName('id')[0].getAttribute('im:bundleId')
if 'com.yourcompany' in bundle_id:
app_name = app.getElementsByTagName('title')[0].childNodes[0].data
print ("%s (%s)" % (bundle_id, app_name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment