curl-library
Re: Curl, Yahoo, Fantasy Sports, & vbScript
Date: Sun, 27 Nov 2005 07:09:47 -0600
> I'd like to access yahoo's login in order to ...
> ...
> Does anyone have any suggestions?
My limited experience is with the yahoo mail login, and even that
has been some time ago, but...
If I remember correctly, there is a "refresh" URL embedded in
one of the documents that needs to be followed.
Check the retrieved HTML for a tag that looks something like:
<meta http-equiv="refresh" content"0;url=XXX">
and try to follow to the "url=XXX" field.
Also, you should probably set the -e [referer] option on each subsequent request
to the URL of the previous page.
Some yahoo pages also contain some badly-nested form elements,
that need to be included with the POST, but might get skipped,
depending on where your parser decides to close the rogue </form>
tag. It seems like the one I had trouble with was something like:
<input type="hidden" name="crumb" value="BLAH-BLAH-BLAH">
Another big problem is that the yahoo login process is a "moving target"
that is, what works today might easily get broken tomorrow, in their
never-ending quest to make sure you don't access their content
without first admiring their ad banners.
You might also have a look at some other projects
to see how they do it:
http://sourceforge.net/projects/fetchyahoo
http://sourceforge.net/projects/yosucker
HTH,
-Jeff
Received on 2005-11-27