0
I want to get single images off a website. The website has photos. Clicking on the photos leads to another page. I want to get the photos from the img src tag in the html. I already have unix code to extract the img src lines I want.
Example: img src="http://website.com/photo.php?user_id=231&photo_id=23&thumbnail=1&SID=kdede19f8z1t38be1"
When I use wget to download this URL, I get a null file.
When I manually enter this URL into my browser, the image loads in the middle of the screen. When I click on the properties, it is a JPEG file. When I look at the html source for the page, it gives the following:
<html><head> … </head><body><img class="decoded" src="http://website.com/photo.php?user_id=231&photo_id=23&thumbnail=1&SID=kdede19f8z1t38be1" alt="http://website.com/photo.php?user_id=231&photo_id=23&thumbnail=1&SID=kdede19f8z1t38be1"></img></body></html>
The only thing I can figure is that it has to do with the tag:
<img class="decoded"
Any ideas?
What exactly you want to do? – stderr – 2013-07-20T02:50:55.257
I figured it out. Because the site is php, I needed to add --trust-server-names as an argument to the wget command. Once I did that, I was able to download the image. – Mike – 2013-07-20T03:05:36.650