Hello, list!

I'd like to automate a download that has to happen a number of times
a week, and wget seems to be the best candidate for the job.
Unfortunately, the website requires a login to get at the file I'm
interested in, and once you're logged in, the site sets a number of
cookies.  When I use wget to try and get the file I'm interested in,
and the cookies aren't present, I just get redirected.  The cookies
are set to expire at the end of the session, so I can't just use
my browser's cookie file.

I was hoping that this would work:

wget --cookies=on --http-user=user --http-passwd=passwd \
   https://www.site.com/blah/filetoget.txt

But it doesn't, unfortunately.  Then I figured I could possibly have
wget load up another page first, to set the cookies, a la:

wget --cookies=on --http-user=user --http-passwd=passwd \
   https://www.site.com/blah/login.asp \
   https://www.site.com/blah/filetoget.txt

But that doesn't work either.

So my question is:  Is it possible to have wget recieve cookies from
one page and then repeat them to another?

If not, I suppose I could probably contribute a "--load-cookies" method
that will take a URL, rather than just a file, as the argument.  Or
something.

Thanks in advance for any help!
-CJ

-- 
WOW: Nyctitropic         |  "Let us rain some DOOM upon the filthy heads
apocalyptech.com/wow     |             of our DOOMED enemies!"
[EMAIL PROTECTED]     |                    - Zim

Reply via email to