Updated iTunes finance report script
If you're an iOS developer, tou've probably already received an email from Apple by now, but if you haven't, Apple has just rolled out a new iTunes Connect Finance Report module. It's a great improvement over the previous version; if you haven't logged into iTunes Connect recently, go and take a look.
Of course, as a result of this update, my Mechanize-driven Ruby script for fetching iTunes Finance Reports stopped working. I've now updated it to handle the new finance module; it was a bit trickier, due to the way Apple uses forms for navigation but after hacking away at it, I eventually got it working again.
The updated script is quite a bit slower than the previous one, mainly because there are more reports listed (up to the last three months worth, rather than ten) and because I have to work through them in reverse order due to a weird bug in Mechanize. Also, the reports are now delivered in gzip format so the script has to decompress them. All in all, it takes about 30 seconds or so to fetch all of the available reports.
Other than that, the output of the script is exactly the same. You can grab the updated script on Github.