1

I've tried many solutions provided here in other forums and websites.

Like this:

#curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" \
#--cookie cjar --cookie-jar cjar \
#--data "username=name" \
#--data "password=pwd" \
#--data "login=Login" \
#--location "https://www.drei.at/de/3kundenzone/business/login">/tmp/tmp.html

or

wget --save-cookies cookies.txt --keep-session-cookies --post-data="username=name&password=pwd" "https://www.drei.at/de/3kundenzone/business/login"

Just for your information that I'm not getting double posted. I'm threw the first 2 google pages, not finding a solution.

I need to login in this form. https://www.drei.at/de/3kundenzone/business/login

But then I need to go to a other site, where i want to wget this page to get the information of it. But this only can be then when I'm logged in.

How can this be done with exactly this page?

  • 1
    You can try to use curl. Simply "copy as curl" from web browser(e.g chrome) inspect element's network log's item. Add -c cookie_filepath to this curl sample to save the cookie, then use -b cookie_filepath to read the cookie when request 2nd page. If the webpage is strict, then you need to request the webpage first with -c, parse the login form, then use -b AND -c together for submit login(you need to figure out -X POST or default GET) and also subsequent pages requests. And don't forget use -L to auto redirect. Use -v to understand the details. – 林果皞 May 9 '16 at 17:11
  • it is a POST i have to do. But i didn't even work with copy as curl. Maybe because there is another parameter given to post "_csrf" which changes every time i log in. – SystemCookie May 10 '16 at 7:52
0

I have found a solution:

I downloaded Phantom JS which is a headless browser. Wrote a little javascript which loggs in to the Website and save the HTML Page. Works like a charm. You can find many tutorials and documentation online exactly for this purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.