I have a problem with downloading a website using wget
.
First I need to login to the website with a username and password:
wget --save-cookies cookies.txt --post-data --cookies=on --keep-session-cookies --post-data="strUser=username&strPW=password" http://hostname/wwwawelle/member/nixlog.asp
Then I try to download the complete website http://hostname/wwwawelle/member/ :
wget -k -r -m -np --load-cookies cookies.txt http://hostname/wwwawelle/member/80_01_member.asp
I get a response saying that I am not logged in then it redirects me to:
http://hostname/wwwawelle/member/nixlog.asp?grund=notloggedin
Any ideas?
HttpFox
00:00:07.712 0.193 597 301 POST 302 Redirect to: 80_01_member.asp http://hostname/wwwawelle/member/login.asp
00:00:07.943 0.255 481 11957 GET 200 text/html http://hostname/wwwawelle/member/80_01_member.asp
00:00:08.232 0.060 428 (6054) GET (Cache) text/css http://hostname/wwwawelle/style.css
00:00:08.260 0.051 420 (589) GET (Cache) application/x-javascript http://hostname/wwwawelle/news/jscr_inc.js
Cookies
ASPSESSIONIDCSATRCQQ APPIOGADBMLHOMFHCALPBFNL / hostname End Of Session
POST Data
strUser username
strPW password
Abschicken Anmelden
wget cookies.txt
# HTTP cookie file.
# Generated by Wget on 2011-03-28 14:23:17.
# Edit at your own risk.
hostname FALSE / FALSE 0 ASPSESSIONIDCSATRCQQ EBAJOGADDHGHCANLKJCMDCPP
cookies.txt
look sensible?