"IMDB_MP13x - missing Country and Language

Discussion in 'Submit: Movie Info Grabbers' started by hkjensen, February 7, 2017.

  1. hkjensen
    • Premium Supporter

    hkjensen MP Donator

    Joined:
    June 11, 2007
    Messages:
    164
    Likes Received:
    47
    Location:
    Copenhagen
    Ratings:
    +63 / 0
    Home Country:
    Denmark Denmark
    Hi

    Current script can't grab Country or Lanquage.

    Attached version works

    // Country
    regexBlockPattern = @"<h4\sclass=""inline"">Country:</h4>.*?<h4";
    regexPattern = @"'url'>(?<country>.*?)</a>";
    block = Regex.Match(strBody, regexBlockPattern, RegexOptions.Singleline).Value.Replace("\n", string.Empty);
    MatchCollection mcCountry = Regex.Matches(block, regexPattern, RegexOptions.Singleline);
    string country = string.Empty;
    foreach (Match ms in mcCountry)
    {
    country = country + ms.Groups["country"].Value + " / ";
    }
    try
    {
    if (!string.IsNullOrEmpty(country))
    {
    movieDetails.Country = country.Remove(country.LastIndexOf(" / "));
    }
    }
    catch (Exception ex)
    {
    MediaPortal.GUI.Library.Log.Error("IMDB Script GetCountry error: {0}", ex.Message);
    }
    // Language
    regexPattern = @"<h4\sclass=""inline"">Language:</h4>.*?url'>(?<language>.*?)</a>";
    string language = Regex.Match(strBody, regexPattern, RegexOptions.Singleline).Groups["language"].Value;
    movieDetails.Language = language;


     

    Attached Files:

    • IMDB_MP13x.zip
      File size:
      6.4 KB
      Uploaded:
      February 7, 2017
      Views:
      149
    • Thank You! Thank You! x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. jant

    jant New Member

    Joined:
    October 13, 2017
    Messages:
    2
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    Home Country:
    Germany Germany
    and plot has been "unknown" for more than month
    whats the problem?
    thx
     
  4. hkjensen
    • Premium Supporter

    hkjensen MP Donator

    Joined:
    June 11, 2007
    Messages:
    164
    Likes Received:
    47
    Location:
    Copenhagen
    Ratings:
    +63 / 0
    Home Country:
    Denmark Denmark
    Hi
    Attached script works

    Changed regex to
    // Plot short
    regexPattern = @"class=""summary_text""\sitemprop=""description"">(?<moviePlotShort>.*?)</div>";

    Changed regex for Plot Long

    regexPattern = @"data-target=""summary-.+?"">(?<moviePlot>.+?)<br\s/>";
    movieDetails.Plot = Regex.Match(strPlotHtml, regexPattern,
    RegexOptions.IgnoreCase |
    RegexOptions.IgnorePatternWhitespace |
    RegexOptions.Singleline |
    RegexOptions.Compiled).Groups["moviePlot"].Value;
     

    Attached Files:

    • IMDB_MP13x.zip
      File size:
      6.4 KB
      Uploaded:
      October 16, 2017
      Views:
      296
    Last edited: October 16, 2017
    • Thank You! Thank You! x 3
  5. jant

    jant New Member

    Joined:
    October 13, 2017
    Messages:
    2
    Likes Received:
    0
    Gender:
    Male
    Ratings:
    +0 / 0
    Home Country:
    Germany Germany
    So now all the en imdb have stopped working. What happened? Any IMDB change? thx
     
  6. DrJekell
    • Premium Supporter

    DrJekell MP Donator

    Joined:
    December 30, 2007
    Messages:
    14
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    United States of America United States of America
    This script fixed the Plot issue but actors still doesn't work. Anyone no what is going on? IMDB scripts haven't worked properly for months now.
     
    Last edited: January 8, 2018
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!