Re: wget fails in Debian Jessie
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sun, Jun 07, 2015 at 08:04:39AM -0300, Eduardo M KALINOWSKI wrote:
> On 06/07/2015 12:31 AM, Leslie Rhorer wrote:
> > I had a script running just fine under Debian Squeeze, but that server is now offline for repair and upgrade to Jessie, so I am now running the script under Jessie, and the script is failing when attempting to scrape data off a website using wget. Under Jessie, wget produces an SSL error when it tries to log in to the website. There is an open bug report #785016, to which I added a comment, but so far no response has come from the developers. Needing to get this script fully working, I am attempting to use curl for the purpose, but I'm not having any luck there, either. I don't get the error, but I don't get the correct web page, either. These are the two lines using wget:
> >
> > wget --save-cookies cookies.txt --keep-session-cookies --no-check-certificate --post-data 'timeOffset=300&UserName=xxxxx%40mygrande.net&Password=yyyyy&RememberMe=false' https://mytotalconnectcomfort.com/portal
> >
> > wget --load-cookies cookies.txt --no-check-certificate https://mytotalconnectcomfort.com/portal/188049/Zones/page2
> >
> > I tried the following using curl:
> >
> > curl -c cookies.txt -d 'timeOffset=300&UserName=xxxxxxx%40mygrande.net&Password=yyyyyyy&RememberMe=false' https://mytotalconnectcomfort.com/portal
> >
> > Instead of returning the main page, it just returns:
> >
> > <html><head><title>Object moved</title></head><body>
> > <h2>Object moved to <a href="/portal/">here</a>.</h2>
> > </body></html>
This is most probably the sign of a redirect (see below)
[...]
> Well, for starters, try using the URL
> https://mytotalconnectcomfort.com/portal/ (note trailing slash) as
> suggested by the error message.
This might be a good check.
> Alternatively, there might also be a
> curl option to automatically follow redirects.
There is: it's option -L (or --location). Additionally, you can set the
maximum number of redirects to follow with --max-redirs
regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlV0KBAACgkQBcgs9XrR2kaHbgCfb/rSDIF0CpbvhQbRO2Ltg1a2
atMAnjjizypx6s7xUEk+qXWtLSDvLrKx
=g/ep
-----END PGP SIGNATURE-----
Reply to: