Bash script to log into website
I'm trying to make a bash script that's supposed to log in to a web page and download some information. However I keep getting a html-file telling me that my browser doesn't support cookies. The wget-line I'm trying to use is
Code:
wget --save-cookies cookies.txt --keep-session-cookies --post-data="username=foo&password=bar" "http://form-action-url/ |
just wondering if you tried without saving the cookies?
when you go to the page with firefox do you get any problems? |
Yup, I've tried without cookies. Firefox logs me in without any problems. Maybe there's an alternative way of doing this? I'm kind of stuck right now...
|
actually the way you are doing it should be correct, maybe the web page has some restrictions, like facebook which if you try to access with lynx or links it simply tells you "go and get a real browser like firefox" so probably you can make a script which uses firefox to do the task... but i am not sure if that is possible, maybe a more experienced user can step in and help.
|
All times are GMT -5. The time now is 06:28 PM. |