I'm trying to have wget retrieve the pics from a list of saved URLs. I have a list of facebook profiles from which I need the main profile picture saved.
Here is what I was working on, I did not get very far with it:
Code:
wget -A .jpg,.jpeg -erobots=off --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6" -i urls.txt
The user agent is needed because without this each page will have an error on it stating that my browser is incompatible.
This is one of many attempts I have tried at this, all basic permutations of the included code.
So far, what is happening is that the pages I retrieve are full HTML, rather than what I want, which is simply the pictures.
The URLs I have are all of the form
Code:
http://www.domain.com/profile.php?id=xxxxxxxxxxx
. When I pull such up in my browser with the included wget command I see everything just fine; however, when I do it reading in a file (or even manually specifying a page to download), what I receive is the html file with everything intact minus the main photo of the page (that pages' user picture).
I believe I need the -A switch, but I think that is what is causing the issues (because the page is not a .jpg, it's getting deleted).
If someone has done the same thing as I am after, or has any helpful tips, I would greatly appreciate a nudge in the right direction.
Thanks.