movie id tt0438097 can be found at http://www.imdb.com/title/tt0438097/
What\'s the url for its poster image?
You can use Trakt API, you have to make a search request with the imdb ID, and the Json result given by Trakt API contains links for two images of that movie (poster and fan art) http://trakt.tv/api-docs/search-movies
Now a days, all modern browser have "Inspect" section:
100% Correct for Google Chrome only:
Try to paste it any where as URL in any browser, you will only get the image.
After playing around with @Hawk's BASE64 discovery above, I found that everything after the BASE64 code is display info. If you remove everything between the last @
and .jpg
it will load the image in the highest res it has.
https://m.media-amazon.com/images/M/MV5BMjAwODg3OTAxMl5BMl5BanBnXkFtZTcwMjg2NjYyMw@@._V1_UX182_CR0,0,182,268_AL_.jpg
becomes
https://m.media-amazon.com/images/M/MV5BMjAwODg3OTAxMl5BMl5BanBnXkFtZTcwMjg2NjYyMw@@.jpg
$Title = $($Movie.Name)
$searchTitle = $Title.Replace(' ','%20')
$moviesearch = Invoke-WebRequest "http://www.imdb.com/search/title?title=$searchTitle&title_type=feature"
$titleclassarray = $moviesearch.AllElements | where Class -eq 'loadlate' | select -First 1
$MoviePoster = $titleclassarray.loadlate
If a thumb is enough, you can use the Facebook Graph API: http://graph.facebook.com/?ids=http://www.imdb.com/title/tt0438097/
Gets you a thumbnail: http://profile.ak.fbcdn.net/hprofile-ak-ash2/50289_117058658320339_650214_s.jpg
As I'm sure you know, the actual url for that image is
http://ia.media-imdb.com/images/M/MV5BMTI0MDcxMzE3OF5BMl5BanBnXkFtZTcwODc3OTYzMQ@@._V1._SX100_SY133_.jpg
You're going to be hard pressed to figure out how it's generated though and they don't seem to have a publicly available API.
Screenscraping is probably your best bet.
The picture seems to generally be inside a div with class=photo and the name of the a tag is poster.
The image itself is just inside the a tag.