I am trying to use Wget to download a page, but I cannot get past the login screen.
How do I send the username/password using post data on the login page and then download the actual page as an authenticated user?
wget
I am trying to use Wget to download a page, but I cannot get past the login screen.
How do I send the username/password using post data on the login page and then download the actual page as an authenticated user?
Best Answer
Based on the manual page:
Make sure the
--post-data
parameter is properly percent-encoded (especially ampersands!) or the request will probably fail. Also make sure thatuser
andpassword
are the correct keys; you can find out the correct keys by sleuthing the HTML of the login page (look into your browser’s “inspect element” feature and find thename
attribute on the username and password fields).