Let's say I want to save the contents of my Facebook page. Obviously fb uses https, thus ssl, how do I download the contents of a secure page using wget?
I found a lot of sources online... and I modify my command, but it doesn't save the page I want.
wget --secure-protocol=auto "https://www.facebook.com/USERNAMEHERE" -O index.html
Actually this is the result I'm getting in index.html: "Update Your Browser You’re using a web browser that isn’t supported by Facebook. To get a better experience, go to one of these sites and get the latest version of your preferred browser:"
The problem is not the SSL / https. The problem is the fact that facebook sees "wget" as the agent and tells "update your browser".
You have to fool facebook with the --user-agent switch and imitate a modern browser.
wget --user-agent="Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1" https://facebook.com/USERNAME -O index.html
and then you will see the actual facebook page if you open index.html in a modern browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With