Maddyhome Forums

Discussions related to software developed at maddyhome.com
It is currently Wed Jun 19, 2013 5:08 am

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 64 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next
Author Message
PostPosted: Sat Sep 11, 2010 7:41 am 
Offline
Site Admin

Joined: Thu Aug 14, 2008 9:26 pm
Posts: 1695
On September 8, 2010 Apple completely updated the Sales and Trends section of iTunes Connect. The old script for downloading the daily reports no longer worked. After a good bit of work I came up with a new script that works with the new website.

Attached is a bash shell script that will allow you to automate the downloading of daily Sales/Trend Reports from Apple. I am making this available as a courtesy to other developers but it is not supported in any way and I do not plan on maintaining it. Use this for your own use and your own risk.

Time will tell how well it works as the new site is updated. One big improvement with this script is that it automatically determines all available reports for your account and attempts to download all missing daily reports.

This script just downloads the data. That's it. What you do with it is up to you.

UPDATES:
  • October 3, 2010: v1.1: Support changes made to iTunes Connect on September 29, 2010.
  • October 4, 2010: v1.1.1: Fix premature removal of file when DLEV set to 0.
  • October 29, 2010: v1.1.2: Fix iTunes Connect change make on October 29, 2010.
  • December 11, 2010: v1.1.3: Fix hardcoded date used for weekly date parameter.
  • March 11, 2011: v1.1.4: Update for changes in sales website.
  • March 12, 2011: v.1.1.5: Add support for downloading weekly reports.
  • August 16, 2011: v.1.1.6: Update for changes in sales website.
  • August 17, 2011: v.1.1.7: Update for changes in sales website.

With the introduction of Apple's new auto-ingest tool, I'd suggest people start using it instead of this script.


Top
 Profile  
 
PostPosted: Sat Sep 11, 2010 8:39 pm 
Offline

Joined: Sat Sep 11, 2010 8:34 pm
Posts: 12
Hey, just wanted to say "cool!", was panicing a bit there when I looked at the new sales and trends site and realized it would be an awful lot of trial and error for me to massage the old script into working. :D

So, thanks.

_________________
--
Magnus Blikstad
WIT Entertainment


Top
 Profile  
 
PostPosted: Sun Sep 12, 2010 10:11 pm 
Offline

Joined: Fri Aug 14, 2009 8:13 pm
Posts: 7
Hello man,
I have downloaded and customized a bit your code for my needs. This is working like a charm.
I also wanted to thank you for sharing your script update. This is really appreciated. Without you sharing this I would have probably spends HOURS to try to fixe it by myself ...

So for me too : "A big thanks" !

OHO.


Top
 Profile  
 
PostPosted: Sun Sep 12, 2010 10:36 pm 
Offline

Joined: Sun Sep 12, 2010 10:34 pm
Posts: 9
I get this error:
Code:
date: illegal option -- -
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]

Are you using a special version of "date"?


Top
 Profile  
 
PostPosted: Mon Sep 13, 2010 3:49 pm 
Offline

Joined: Thu Aug 28, 2008 5:20 pm
Posts: 9
futuretap,

the script uses gnu date (linux) not bsd (mac).. which is why you are getting those errors (I am guessing you aren't on linux).


Top
 Profile  
 
PostPosted: Mon Sep 13, 2010 5:08 pm 
Offline

Joined: Fri Sep 10, 2010 6:03 am
Posts: 3
AWESOME! thanks a lot ..


Top
 Profile  
 
PostPosted: Mon Sep 13, 2010 8:55 pm 
Offline

Joined: Sun Sep 12, 2010 10:34 pm
Posts: 9
@fleas, yes, I'm running Mac OS X. It worked like a charm with the alternate, commented-out version of the date commands (and the ssl-enabled curl from MacPorts).

Btw, I had to comment out the sed command in line 186 to transform the begin and end dates. The downloaded original is already in the format it was before. Only the order of the fields changed, so I had to adopt my import script.

Thanks for this great script!


Top
 Profile  
 
PostPosted: Wed Sep 15, 2010 6:24 pm 
Offline

Joined: Tue Apr 20, 2010 11:50 pm
Posts: 12
wow lifesaver. thanks so much.


Top
 Profile  
 
PostPosted: Thu Sep 30, 2010 10:26 pm 
Offline

Joined: Sun Sep 12, 2010 10:34 pm
Posts: 9
looks like it has stopped working today. AppSales Mobile doesn't work anymore, too.


Top
 Profile  
 
PostPosted: Thu Sep 30, 2010 10:44 pm 
Offline
Site Admin

Joined: Thu Aug 14, 2008 9:26 pm
Posts: 1695
I noticed both cases. I spent a little time this morning trying to figure out what changed and had no luck. Apple sure makes this difficult. If anyone has a clue let me know.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 64 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group