Created
April 25, 2012 21:13
-
-
Save simonwhitaker/2493483 to your computer and use it in GitHub Desktop.
Find top-selling apps with com.yourcompany.* bundle IDs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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