Maddyhome Forums

Discussions related to software developed at maddyhome.com
It is currently Tue May 21, 2013 7:36 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 64 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7  Next
Author Message
PostPosted: Sun Mar 13, 2011 12:57 pm 
Offline

Joined: Sat Sep 11, 2010 8:34 pm
Posts: 12
Doh, was wondering why I was seeing so many sales the 28th...
Turns out it was that it downloaded the weekly reports (and I sort the data based on the begin date so it all ended up on the same day :D).

Works again now though, good work!

_________________
--
Magnus Blikstad
WIT Entertainment


Top
 Profile  
 
PostPosted: Mon Mar 14, 2011 8:56 pm 
Offline

Joined: Tue Apr 20, 2010 11:50 pm
Posts: 12
Thanks for the update.


Top
 Profile  
 
PostPosted: Mon Aug 01, 2011 9:50 am 
Offline

Joined: Sun Sep 12, 2010 10:34 pm
Posts: 9
On Saturday, the script ceased to work:

Getting sales and trend data for 2011-07-30 (07%2F30%2F2011)
Data for 2011-07-30 failed

Apparently, the final curl to download the csv fetches an error page instead of the csv. I compared the HTTP request with a Tamper Data session in Firefox and found no significant differences.

I tried several things to no avail:
- made "%2F" in date strings uppercase
- added -H "Accept: */*" (to curl in line 201)
- added -H "Accept-Encoding: gzip, deflate" (to curl in line 201)

Any idea what has changed on Apple's side and why it breaks?


Top
 Profile  
 
PostPosted: Mon Aug 01, 2011 4:21 pm 
Offline
Site Admin

Joined: Thu Aug 14, 2008 9:26 pm
Posts: 1679
It's still working for me.


Top
 Profile  
 
PostPosted: Tue Aug 02, 2011 7:41 am 
Offline

Joined: Sat Sep 11, 2010 8:34 pm
Posts: 12
Still working here too.

_________________
--
Magnus Blikstad
WIT Entertainment


Top
 Profile  
 
PostPosted: Tue Aug 16, 2011 1:05 pm 
Offline

Joined: Sat Sep 11, 2010 8:34 pm
Posts: 12
Today it decided to download the weekly report again though.... hmm...

_________________
--
Magnus Blikstad
WIT Entertainment


Top
 Profile  
 
PostPosted: Tue Aug 16, 2011 1:26 pm 
Offline

Joined: Sat Sep 11, 2010 8:34 pm
Posts: 12
Seems some of the ids have changed on the site. Could someone confirm that changing the selectDayName and selectWeekName variables work?

This seem to work....
Code:
    selectDayName=${dailyName/_6/_47}
    selectWeekName=${dailyName/_6/_52}

_________________
--
Magnus Blikstad
WIT Entertainment


Top
 Profile  
 
PostPosted: Tue Aug 16, 2011 4:59 pm 
Offline
Site Admin

Joined: Thu Aug 14, 2008 9:26 pm
Posts: 1679
Those changes work for me. Thanks. I'll post an updated script shortly.


Top
 Profile  
 
PostPosted: Wed Aug 17, 2011 4:04 pm 
Offline

Joined: Sat Sep 11, 2010 8:34 pm
Posts: 12
Okay... new issue.
Seems today I'm getting the following id on the page; theForm:j_id_jsp_60478444_6.
The reason this is bad is I'm assuming ajaxName=${dailyName/_6/_2} will match things wrong with the initial _6 (right after jsp). Right?

_________________
--
Magnus Blikstad
WIT Entertainment


Top
 Profile  
 
PostPosted: Wed Aug 17, 2011 4:18 pm 
Offline

Joined: Sat Sep 11, 2010 8:34 pm
Posts: 12
This seem to do the trick. Not sure how "correct" it is though.

Code:
   
    dailyName=`getTagId 'theForm:j_id_jsp_[0-9]*_6' sales.html`
    dailyName=${dailyName//:/%3A}
    ajaxName=${dailyName%?}2
    dateName=${dailyName%?}8
    selectDayName=${dailyName%?}47
    selectWeekName=${dailyName%?}52


(yes, I had to google to get the %? thing... The intention is to "remove the last character".... so, hope that's what it does :D)

_________________
--
Magnus Blikstad
WIT Entertainment


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 Previous  1 ... 3, 4, 5, 6, 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