LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   getting information from a webpage in terminal (https://www.linuxquestions.org/questions/linux-newbie-8/getting-information-from-a-webpage-in-terminal-41312/)

charlie123 01-13-2003 10:30 AM

getting information from a webpage in terminal
 
hi,
i used the lynx -dump command in a script i wrote to get weather reports for my area, and i would now like to do the same but to check other things, like PM's on different messageboards etc. However lynx only stores cookies for one session. Does anyone know of if there is a program like lynx that is will store the cookies so that i can use a script to get information from that site?
i was thinking this would probably be possible in perl but i dont know perl.
the only way i could think of was to use lynx, but run it with the script option and get it to enter my username password on the site each time, but this would take quite a while for it to get the information. also im sure there must be a better way, but being a newbie i dont know how else to do it.

thanks :)

CHarlie

emanuelgreisen 01-31-2003 05:58 AM

Hi,

from: man lynx

...
-cookie_file=FILENAME
specifies a file to use to read cookies. If none is specified,
the default value is ~/.lynx_cookies for most systems, but
~/cookies for MS-DOS.

-cookie_save_file=FILENAME
specifies a file to use to store cookies. If none is specified,
the value given by -cookie_file is used.

...

Use them in opposite order to first get your cookie (and move the file somewhere safe). Later use the --cookie_file=/some/path/cookie to make sure you have the cookies avail.


All times are GMT -5. The time now is 04:51 PM.