[Approved] Fix to "IMDB with AKA grabber" (3 Viewers)

BalduinB

Portal Member
July 29, 2009
36
8
Home Country
Germany Germany
As shown multiple times in the forum, the "IMDB with AKA grabber" didn't grab the year, plot and tagline anymore.

Well I'm not very familiar with the script, but I guess I fixed it.
IMDB must have changed their layout slightly, but enough to mess up the script.

I made the changes while being a bit bored while sitting at my laptop. I'm not at home where my HTPC is, so I can't test my corrections on a bigger movie folder right now. Here on my laptop I have only 3 movies for a test. But with these it seems to work.

So maybe you guys out there want to give it a try.

Balduin


Script is now part of MP, use the Update script function in configuration.
Original post of Deda: https://forum.team-mediaportal.com/submit-movie-info-grabbers-287/fix-imdb-aka-grabber-80425/index10.html#post624518


I removed my first version of a fixed script.
Deda did some hard work and fixed many more errors. The actual version is "hidden" in this thread and can be found here:
RC2: https://forum.team-mediaportal.com/submit-movie-info-grabbers-287/fix-imdb-aka-grabber-80425/index9.html#post616673
RC3: https://forum.team-mediaportal.com/submit-movie-info-grabbers-287/fix-imdb-aka-grabber-80425/index9.html#post619193
RC4: https://forum.team-mediaportal.com/submit-movie-info-grabbers-287/fix-imdb-aka-grabber-80425/index10.html#post624518
 

BalduinB

Portal Member
July 29, 2009
36
8
Home Country
Germany Germany
re: Fix to "IMDB with AKA grabber"

But there is a slight difference between these two posts. While you are asking for someone to find out what's wrong, I added a solution ;)

See attached file above :)
 

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    re: Fix to "IMDB with AKA grabber"

    Sadly your solution made no difference, after clearing db and rescanning exactly same results, please test creating a dummy file

    Avatar (2009)

    Will not be found in results
     

    BalduinB

    Portal Member
    July 29, 2009
    36
    8
    Home Country
    Germany Germany
    re: Fix to "IMDB with AKA grabber"

    Well ... seems that IMDB doesn't find "Avatar" itself.

    Try searching for "Avatar" on IMDB: IMDb Search for Avatar

    IMDB returns several "Avatars" as exact matches, but not the one you like it to.
    The correct one is returned in "Popular Titles", but the script tries the exact matches first and after that the popular titles.
    But the script also does only return the first six matches, so it finds enough in "exact matches" (IMDB returns 9) and ignores "popular titles"

    What I didso far was altering the script to find the plot, year and tagline again, after it finds the correct movie.
    I did not change anything, related to find the movie itself ... so far.
    I'll try and find out ... tomorrow, after getting some sleep ;)

    Balduin

    P.S.: An example that works: http://www.imdb.com/find?s=all&q=Catch+Me+If+You+Can
    IMDB returns 3 exact matches (one is sorted out by the script because of the "TV"-Tag) and one popular match. In this case the script works ...
    I think I'll find a way ... hopefully :)
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    re: Fix to "IMDB with AKA grabber"

    That would be great, this has been a bit of a let down compared to MovingPictures as you can imagine, but the last time I run the video db was about 6-9 months ago, so any help much appreciated.
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    re: Fix to "IMDB with AKA grabber"

    Well, I also was bored last night :) so I tried to fix this for myself and surprisingly it works for me. You can try it if you like. The only problem I found is special characters in movie name like "À l'intérieur" or "Død snø" but this can be resolved using English name ie. "Inside" or "Dead snow" or target the movie by "ttxxxxx" number.
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    re: Fix to "IMDB with AKA grabber"

    I'm trying it now, but if you look at my other post about poor results, there's a pretty popular list of films that are not even found, especially Harry Potter series of movies :confused:
     

    Deda

    Lead Dev MP1 Videos
  • Premium Supporter
  • March 18, 2009
    2,423
    2,385
    Zagreb
    Home Country
    Croatia Croatia
    re: Fix to "IMDB with AKA grabber"

    Yes I see, problem in the script is :

    bool bSkipThisAkaEntry = imdbakaOptions.Contains("(TV)") |
    imdbakaOptions.Contains("(TV series)") |
    imdbakaOptions.Contains("(VG)") |
    imdbakaOptions.Contains("(poster title)") |
    imdbakaOptions.Contains("(working title)") |
    imdbakaOptions.Contains("(promotional abbreviation)") |
    imdbakaOptions.Contains("(video title)") |
    imdbakaOptions.Contains("(original script title)") |
    imdbakaOptions.Contains("(video box title)") |
    imdbakaOptions.Contains("(new title)") |
    imdbakaOptions.Contains("(DVD box title)");
    if (bSkipThisAkaEntry == false)

    In Harry potter case you can find in Popular list (total 6 entries) 2 of them contains working title, dvd title and maybe some more from the list above

    I think :
    Regex.Match(strBodyPopular, "<tr>[\s]*<td[^>]*>.*?</td>[\s]*<td[^>]*>.*?</td>[\s]*<td[^>]*>.*?<a\shref=""(?<tt>/title/tt[0-9]*/)[^>]*>(?<title>.*?)</a>(?<options>.*?)[\s]*(?(?=<br>)(?<aka><br>.*?))</td>[\s]*</tr>", RegexOptions.IgnoreCase Or RegexOptions.IgnorePatternWhitespace Or RegexOptions.Singleline Or RegexOptions.Compiled)

    must be reviewed so the return string contain only English movie name without AKA, 'cause those AKA contains all that rubbish

    I'm little bit tiny in RegEx coding but I have some time maybe I will found something :)
     

    Paranoid Delusion

    Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    re: Fix to "IMDB with AKA grabber"

    Your script found 5 more films, so better imo :)

    Thanks so much to you both for looking at this, would be nice to get the detection rate upto that of imdb_de_ofdb script, so if that file can gives you any pointers :D
     

    Users who are viewing this thread

    Top Bottom