I was surprised that there wasn’t already a script out there to download iAd reports from Apple’s iTunes Connect website.
Apple released a Java based command line tool to download the sales reports for Apps but neglected to provide something similar for iAd publishers. Some Googling around I was further surprised that I couldn’t find any 3rd party scripts to download this data.
I did however find a python script called appsalesdaily.py which is a web scraper that downloads the sales reports. It handled a lot of the nasty http cookies and login stuff that is usually very tricky to do with a script. I modified that script and extended it with a function to download daily iAd reports.
I don’t wish this sort of struggle on anyone so I’m making the code available. https://github.com/mfwarren/appdailysales