You should probably add an Accept
header and/or User-Agent
header.
Most web servers deliver different content depending on headers set by the client (e.g. web browser, Java HttpURLConnection, curl, ...). This is especially true for Accept
, Accept-Encoding
, Accept-Language
, User-Agent
, Cookie
and Referer
.
As an example, a web-server might refuse to deliver an image, if the Referer
header does not link to an internal page.
In your case, the web-server doesn't deliver images if it seems like some robot is crawling it. So if you fake your request like if it's coming from a web-browser, the server might deliver it.
When crawling web-sites, you should respect robots.txt
(because you act like a robot). So strictly speaking you should be careful when faking User-Agent
when doing a lot of requests or create a big business out of this. I don't know how big web-sites react on such behavior, especially when someone by-passes there business...
Please don't see this as a telling-off. I just wanted to point you to this, so you don't run into trouble. Maybe it's not a problem at all, YMMV.