Hi Sir
I try to program a Bourne Shell script under Fedora Core 2, using wget last cvs version, which supports the --keep-session-cookies parameter.


The problem is, to get automatically connected to the site using a post form with login/password ( I know how to do that ), then to retrieve the session cookie into the cookies.txt file,
then to manage all the session and eventually permanent cookies, such that I always remain connected, without having to authenticate again.


Indeed, I wish to repeatedly run wget with several different urls on the same site, while keeping connected all the time.

The problem, involves both loading and storing all cookies at the same time, maybe in the same file, my question is: Which are the right parameters for doing so ?

  Eventually, I could get to run wget with those parameters:

wget -O - --keep-session-cookies --save-cookies cookies.txt \
     --load-cookies cookies.txt ${url} > file.html

Indeed, I compute the ${url} value from the previous results of the resulting file content, and I don't use wget recursively.

First question: Are those parameters the correct way for loading/storing all the cookies at the same time ( sessions cookies included ).

  Second question: If it's wrong, which is the right way for doing this ?

The urls implied, are *.asp scripts , which give both html and JavaScript contents, I'm able to parse the resulting files correctly.

  Thank you very much for your help.

  Best regards.

  Jean Francois Ortolo




Reply via email to