cURL / Mailing Lists / curl-library / Single Mail

curl-library

Curl, Yahoo, Fantasy Sports, & vbScript

From: Mike <Mike_at_KnickerBlogger.Net>
Date: Sat, 26 Nov 2005 17:00:15 -0500

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 & vbscript.
I've tried following the steps from an archived post where someone talked
about accessing yahoo's login:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(http://curl.haxx.se/mail/archive-2002-03/0203.html)

       The simplest case is:
        (User agent set to something like Links, lynx, unknown, but not
mozilla;
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"
here)
        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
login.mail.yahoo.com)
        5. Then, you should get a redirect reply with 3/4 more cookies ("T",
"Y",
....)
        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 _cookie1.txt
"http://login.yahoo.com/config/login?.done=http://fantasysports.yahoo.com"

At this point _cookie1.txt has cookie 'B', and the page is saved to
_url1.txt.

I'm able to do step 3 as well (using a vbscript to parse _url1.txt & get all
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 _cookie1.txt
-d
".tries=1&.src=&.md5=&.hash=&.js=&.last=&promo=&.intl=us&.bypass=&.partner=&
.u=XXX&.v=0&.challenge=XXX&.yplus=&.emailCode=&pkg=&stepid=&.ev=&hasMsgr=0&.
chkP=Y&.done=http://fantasysports.yahoo.com&login=YYY&passwd=YYY&.persistent
=y"
"http://login.yahoo.com/config/login?.done=http://fantasysports.yahoo.com"

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-26