#105 imdb.php does not fetch runtime in certain cases

closed-fixed
nobody
engines (42)
5
2010-11-27
2010-11-21
pmallot
No

imdb.php line 189
preg_match('/Runtime:?<\/h4>\s*(\d+)\s+min\s+<\/div/si', $resp['data'], $ary);
Fails to match the runtime when more than one time is given (i.e. http://www.imdb.com/title/tt0430922/\), or when there is some kind of prefix (i.e. http://www.imdb.com/title/tt0815236/\)
I locally changed the line to
preg_match('/<\/h4>\D*?(\d+)\s+min/si', $resp['data'], $ary);
which works fine, but will of course only fetch the first given time. Maybe there is a better solution?

Other examples where the problem occured are:
http://www.imdb.com/title/tt0862467/
http://www.imdb.com/title/tt1212974/
http://www.imdb.com/title/tt1186370/
http://www.imdb.com/title/tt0455960/

Discussion

  • roland obermayer

    • status: open --> open-fixed
     
  • roland obermayer

    fixed in cvs

     
  • roland obermayer

    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks