download csv automatically?

Skip to first unread message

Benjamin West

Feb 4, 2013, 6:50:01 AM2/4/13
to Howard Look,
Howard had a nifty idea to log into carelink automatically and download CSV results.

I took a look and found that the site uses a js browser sniff test to modify a cookie.  This cookie is tested through a series of redirects where the values of the cookies seem to be compared with the values of query parameters.  Once the cookie is validated, the user is sent back to the original url, but the HTML for the download form is actually sent to the UA.

I designed a simple UA using zombie; I got through the first round of redirects, but the resulting HTML only contains some kind of tracking image.  I didn't expect this since I'm basically emulating safari's behavior, at least I thought I was.

Here's my non-working attempt:


Damon Muma

Feb 5, 2013, 12:21:23 AM2/5/13
to, Howard Look
Automatically as in whenever you bring your pump near your computer? that is insanely sweet!

Howard Look

Feb 5, 2013, 11:02:28 AM2/5/13
to, Howard Look
I'm simply trying to end up with a command line tool or API that fetches the CSV for a date range, e.g.:
> getFromCareLink 2013-01-01 2013-01-31 

Bewest got a little further than I did. I was trying a php/curl script. But my web dev skills aren't good enough to figure out how to fool the CareLink cookie craziness.

Reply all
Reply to author
0 new messages