Re: Curl, Yahoo, Fantasy Sports, & vbScript
Date: Sat, 26 Nov 2005 17:21:15 -0600
Are you leaving anything out of the command lines you showed?? If not,
I'd say you're not sending those cookies back to the server...
All you get with "-D cookie.txt" is a dump of the headers sent back by the
server. Curl only writes to that file, it doesn't read from it. You would
be better off with something like:
-b cookies.txt -c cookies.txt
instead of -D cookies.txt
On 11/26/05, Mike <Mike_at_knickerblogger.net> wrote:
> I'd like to access yahoo's login in order to curl some information from
> yahoo's fantasy sports. I am doing this from windows using curl &
> I've tried following the steps from an archived post where someone talked
> about accessing yahoo's login:
> The simplest case is:
> (User agent set to something like Links, lynx, unknown, but not
> otherwise, the server will be more demanding)
> 1. Get mail.yahoo.com
> 2. Redirected to login.mail.yahoo.com ( You will get a cookie "B"
> 3. Find and fill all the form entry and formulate a POST request
> 4. Send our the Post request with the Cookie you have (referer
> filled with
> 5. Then, you should get a redirect reply with 3/4 more cookies ("T",
> 6. Then, just get the redirected URL with all the cookies you have.
> So far I've been able to replicate some steps.
> Steps 1 & 2 look like this:
> curl\curl.exe -A "Lynx/2.7.1 libwww-FM/2.14" -o _url1.txt -D
> At this point _cookie1.txt has cookie 'B', and the page is saved to
> I'm able to do step 3 as well (using a vbscript to parse _url1.txt & get
> the input names & values for POST), but this is when I run into problems.
> For step 4 I run:
> curl\curl.exe -A "Lynx/2.7.1 libwww-FM/2.14" -o _url2.txt -D
> Where I get the values for XXX from the _url1.txt and YYY is my username &
> password. Also in _cookie1.txt there exists values for cookies 'F', 'Y', &
> 'T'. However the file _url2.txt never gets created. Furthermore using that
> cookie I try to access my intended web page, without success (I get 'No
> Teams' - meaning that Yahoo doesn't see anyone logged in).
> (curl\curl.exe -A "Lynx/2.7.1 libwww-FM/2.14" -o _url3.txt -D
> _cookie1.txt "http://basketball.fantasysports.yahoo.com/nba")
> Does anyone have any suggestions?
Received on 2005-11-27