Given an IMDB movie id, how do I programmatically get its poster image?

前端 未结 17 838
礼貌的吻别
礼貌的吻别 2020-12-08 03:17

movie id tt0438097 can be found at http://www.imdb.com/title/tt0438097/

What\'s the url for its poster image?

17条回答
  •  心在旅途
    2020-12-08 03:52

    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.

提交回复
热议问题