cURL / Mailing Lists / curl-users / Single Mail


Re: Using curl to get Yahoo mail

From: Daniel Stenberg <>
Date: Tue, 2 Apr 2002 10:49:17 +0200 (MET DST)

On Thu, 28 Mar 2002, Kerry Nice wrote:

> Ok, much further along now. I was making a dumb mistake, my grep for one
> of the parameters matched two lines so my resulting url was messed up.
> But I have suceeded in retrieving something out of the trash on my account
> (nothing in the inbox right now). It has a whole lot of chaff I have to
> figure out how to strip off, but logging in and staying logged in seemed to
> be my main problem. I guess all the nice cookie stuff was added after my
> version, I'm using 7.8.1. But this seems to mostly work.

Glad to hear you make progress! ;-)

But yes, there has been cookie improvements to curl since 7.8.1. The
cookiejar option -c was added in 7.9 and some other cookie parsing problems
have been addressed as well.

> There is one thing that I'm not sure about. All of the links in the
> following pages are relative paths, but no host. Right now I just
> hardcoded in the host it seems to go to all the time, but how do I
> determine where I'm getting redirected to and save that off.

The -w option and "%{url_effective}" should output the last URL you fetched,
which is useful when you've followed one or more redirects. Using that, you
know which host you fetched the actual HTML from.

I hope this helps.

    Daniel Stenberg -- curl groks URLs --
Received on 2002-04-02