tboothman / imdbphp

PHP library for retrieving film and tv information from IMDb
244 stars 84 forks source link

unable to return details for ID 0120347 #218

Closed DaanDeJong2001 closed 3 years ago

DaanDeJong2001 commented 3 years ago

Description

library is unable to fetch plot, cast, poster or country.

I see that cast is labelled for this one different: "Cast verified as complete"

Movies / TV-Shows / Person

https://www.imdb.com/title/tt0120347/reference

Type

Bug

Expected Results / What do you want to do?

expect details

Actual Results / What is happening?

empty return

guardiaopt commented 3 years ago

I have a similar problem, this happens because IMDB changed the layout.

https://help.imdb.com/article/issues/G6HYBHAA9EHPXA6G?ref_=tt_banner_learn

DaanDeJong2001 commented 3 years ago

It looks like IMDB returns the data now sometimes as a JSON and renders into HTML.

I think this library could search for the schema and if available, use the JSON directly, instead parsing HTML. Potentially also much easier to get structured data this way.

This is returned for the title mentioned. I added line-breaks and spaces for readability.

<script type="application/ld+json">
{
   "@context":"https://schema.org",
   "@type":"Movie",
   "url":"/title/tt0120347/",
   "name":"Tomorrow Never Dies",
   "alternateName":"James Bond 007 - Der Morgen stirbt nie",
   "image":"https://m.media-amazon.com/images/M/MV5BMTM1MTk2ODQxNV5BMl5BanBnXkFtZTcwOTY5MDg0NA@@._V1_.jpg",
   "contentRating":"16",
   "genre":[
      "Action",
      "Adventure",
      "Thriller"
   ],
   "actor":[
      {
         "@type":"Person",
         "url":"/name/nm0000112/",
         "name":"Pierce Brosnan"
      },
      {
         "@type":"Person",
         "url":"/name/nm0000596/",
         "name":"Jonathan Pryce"
      },
      {
         "@type":"Person",
         "url":"/name/nm0000706/",
         "name":"Michelle Yeoh"
      }
   ],
   "director":[
      {
         "@type":"Person",
         "url":"/name/nm0006854/",
         "name":"Roger Spottiswoode"
      }
   ],
   "creator":[
      {
         "@type":"Organization",
         "url":"/company/co0054040/"
      },
      {
         "@type":"Organization",
         "url":"/company/co0007143/"
      },
      {
         "@type":"Organization",
         "url":"/company/co0026841/"
      },
      {
         "@type":"Person",
         "url":"/name/nm0270761/",
         "name":"Bruce Feirstein"
      },
      {
         "@type":"Person",
         "url":"/name/nm0001220/",
         "name":"Ian Fleming"
      }
   ],
   "trailer":{
      "@type":"VideoObject",
      "name":"What to Watch While You Wait for &apos;No Time to Die&apos;",
      "embedUrl":"/video/imdb/vi3602956569",
      "thumbnail":{
         "@type":"ImageObject",
         "contentUrl":"https://m.media-amazon.com/images/M/MV5BMTYzZGFiMzQtMjlkYy00MmU4LTlmZjctZDVmOWRjYmExZGEwXkEyXkFqcGdeQWplZmZscA@@._V1_.jpg"
      },
      "thumbnailUrl":"https://m.media-amazon.com/images/M/MV5BMTYzZGFiMzQtMjlkYy00MmU4LTlmZjctZDVmOWRjYmExZGEwXkEyXkFqcGdeQWplZmZscA@@._V1_.jpg",
      "description":"If the wait for &apos;No Time to Die&apos; feels endless, we have three titles to make the time go by, including a heist film where Daniel Craig delivers both the action and delightful puns, a classic Bond title where the women don&apos;t pull any punches, and a trippy miniseries from &apos;No Time to Die&apos; director Cary Joji Fukunaga."
   },
   "datePublished":"1997-12-18",
   "description":"James Bond sets out to stop a media mogul&apos;s plan to induce war between China and the UK in order to obtain exclusive global media coverage.",
   "keywords":"official james bond series,megalomaniac,media tycoon,world war three,ex boyfriend ex girlfriend relationship",
   "review":{
      "@type":"Review",
      "itemReviewed":{
         "@type":"CreativeWork",
         "url":"/title/tt0120347/"
      },
      "author":{
         "@type":"Person",
         "name":"ma-cortes"
      },
      "dateCreated":"2013-04-21",
      "inLanguage":"English",
      "name":"Overwhelming and thrilling entry in which Bond/Brosnan  goes after  a powerful media mogul",
      "reviewBody":"Elloit Carver (Jonathan Pryce) is a megalomaniac and selfish media baron. Carver has the power to reach every person on the planet through his Carver Media Group Network- except for the People&apos;s Republic of Chinese who refuse his presence in their nation . The mogul is tied to the disappearance of a British battleship in the South China Sea . James Bond (Pierce Brosnan) heads to stop the media mogul&apos;s plan to induce war between China and the UK in order to obtain exclusive global media coverage and whose tentacles reach around the world . Carver, whose spouse (Teri Hatcher) was a former flame of 007 , is supported by a computer genius (Ricky Jay) and a nasty hunk man (Gotz Otto) . Along the way Bond join forces with a Chinese secret agent (Michelle Yeoh) , expert on martial arts . In addition , there appears the usuals , such as M (Judi Dench), Q (Desmond Llewelin) , Lois Maxwell, ¨MoneyPenny¨ (Samantha Bond) , Minister of Defense (Julian Fellowes) and Jake Wade (Joe Don Baker) . But not counting the regular characters of Bond, Q, M and Moneypenny, this is the first Bond movie to contain absolutely no Ian Fleming references . \n\nLikable Pierce Brosnan in an amazing adventure set on wonderful outdoors located mostly on Vietnam , being actually shot in Thailand . The original title of the film was &quot;Tomorrow Never Lies&quot;, which makes sense when you consider media mogul Elliot Carver was creating the next day&apos;s headlines in advance, then causing those events to happen , but a typo on an early script draft was adopted by the producers, and ¨Tomorrow never dies¨ was used instead . This is a Bond&apos;s good outing in which faces dangerous adventures around the globe . Brosnan&apos;s outing with overwhelming action and spectacular scenarios , the film teams Bond with Michelle Yeoh as endearing ally in an effort to stop a technological communication mogul . After his first introduction in ¨Golden eye¨ as tough and attractive James Bond of the Ian Fleming&apos;s famous creation , Pierce Brosnan went on playing various 007 , as ¨Die Another Day ¨ and this ¨Tomorrow never dies¨ . The picture starts with an overblown opening and following other impressive action set pieces . This solid , slick thriller with magic mix of action-packed , dazzling stunts, gadgetry, and romance provided by sexy company as Teri Hatcher and Michelle Yeoh . Pierce Brosnan as James Bond is fine , he does remarkably well , he earns in irony, humor ,suavity and sympathy, however also has coldness ,cunning , intelligence and toughness . Here Bond is an efficient , relentless agent trying to chase obstinately the criminals , traveling around the world as always , as this globe-trotting story is set in Pucket, Bangkok, Thailand (Saigon, Vietnam) , Hamburg , London and many other places . Because the second half of the film is set in Vietnam, the production negotiated for some time for permission to film there ; although it appeared close, the Vietnamese Ministry of Culture and Information eventually refused to allow it , the production decided to use Thailand as Vietnam, with Bangkok substituting for Saigon . Bond to achieve his aims , along the way uses violent means even pulling off brutal killings against enemies who wreak all sorts of havoc . As always Bond will use fantastic gadgets and spectacular cars (here 15 BMW 750&apos;s were destroyed in the making of the film) provided by ¨Q¨ (Desmond Llewelyn) . The stealth ship is not a fictional invention , Lockheed secretly constructed and demonstrated one in the early 1980s, but the US Navy finally decided they didn&apos;t want any ; the prototype, called the Sea Shadow, was 160 feet long . The picture contains comic-strip adventure , sensational pursuits , silly set pieces , great stunts , tongue-in check humor, automovile chase, frantic unstopped action , a breathtaking tour around the world , amazing gimmicks and stimulating images like are the happenings on the spectacular pursuits on the motorcycle and helicopter . As is like a roller-coaster , as is fast-paced , light , excitement, funny and entertaining ; it&apos;s a winner for oo7 fans and non-fans alike . The chase and suspense formula wears strong in this entry .\n\nThe film made particularly heavy use of gadgetry because some fans thought there was too little of it in GoldenEye . Enjoyable title song by Sheryl Crow and stirring musical score fitting to action by David Arnold , following the John Barry&apos;s classic style . Riveting and fancy main titles , furthermore eye-popping production design by Allan Cameron . It&apos;s brimming with colorful and fascinating cinematography by cameraman Robert Elswit . The motion picture produced by habitual producers, Barbara Broccoli and Michael G. Wilson and dedicated to the memory of long-time Bond-film producer Albert R. Broccoli ; being professionally made by Robert Spottiswoode who filmed other successes such as ¨the 6th day¨, ¨Turner and Hooch¨, ¨Air America¨ , Shoot to kill¨and Under fire¨ . Robert keeps this moving at an incredibly fast pace and this story about every&apos;s favorite super-spy facing off dangerous mogul . The film will appeal to James Bond series&apos;s buffs but good for fans only ; because this one goes on far too long and has provoked so much debate among 007 followers . Rating : 6&apos;5 , well worth watching .",
      "reviewRating":{
         "@type":"Rating",
         "worstRating":1,
         "bestRating":10,
         "ratingValue":7
      }
   },
   "aggregateRating":{
      "@type":"AggregateRating",
      "ratingCount":183531,
      "bestRating":10,
      "worstRating":1,
      "ratingValue":6.5
   },
   "duration":"PT1H59M"
}
</script>
DaanDeJong2001 commented 3 years ago

This is the schema.org description for the Movie type above: https://schema.org/Movie