MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » General Forums » Jobs/Tasks @ MediaPortal » Movie Info Grabbers


Movie Info Grabbers Post new or updated grabbers here. The team will integrate them into the update feature.

Reply
 
Thread Tools Display Modes
Old 2008-08-03, 08:03   #71 (permalink)
Portal Member
 
Join Date: Mar 2008
Location: Ottawa
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts

Country:

My System

Default

Quote:
Originally Posted by dukus View Post
In latest SVN i add support for scripting using CS-Script from CS-Script
in this may find some example of scripts, but basically every script are a standalone class.
I prototyped the following C# code in IMDB.cs to support "aliases". Should I change the script instead?

Code:
    private void FindIMDB(string strURL, int iLimit)
    {
      string absoluteUri;
      string httpPage = GetPage(strURL, "utf-8", out absoluteUri);
      string httpString = System.Web.HttpUtility.HtmlDecode(httpPage);
      Match imdbEntry = Regex.Match(
        httpString,
        @"<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 | RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline | RegexOptions.Compiled);

      while (imdbEntry.Success)
      {
        string imdbTitle = imdbEntry.Groups["title"].Value.Replace("\"", "");
        string imdbURL = imdbEntry.Groups["tt"].Value;
        string imdbOptions = Regex.Replace(imdbEntry.Groups["options"].Value, @"<(.|\n)*?>", String.Empty,
                                            RegexOptions.IgnoreCase | RegexOptions.Compiled);
        IMDBUrl url = new IMDBUrl(@"http://us.imdb.com" + imdbURL, imdbTitle + @" " + imdbOptions + @" (imdb)", @"IMDB");
        elements.Add(url);
        imdbEntry = imdbEntry.NextMatch();

        string imdbAka = imdbEntry.Groups["aka"].Value;
        Match imdbAlias = Regex.Match(imdbAka, @"<br>\saka\s<em>""(?<alias>.*?)""</em>", RegexOptions.IgnoreCase | RegexOptions.Compiled);
        while (imdbAlias.Success)
        {
          imdbTitle = imdbAlias.Groups["alias"].Value;
          url = new IMDBUrl(@"http://us.imdb.com" + imdbURL, imdbTitle + @" " + imdbOptions + @" (imdb)", @"IMDB");
          elements.Add(url);
          imdbAlias = imdbAlias.NextMatch();
        }
      }
    }
My favorite western is "The Good, The Bad, and the Ugly". Without this change I have to re-name the file to "Buono, il brutto, il cattivo., Il" to get an IMDB match. The above code adds aliases to the list of results so I can use the US english title instead of the published Italian name.

Rick

Last edited by rjburke377; 2008-08-03 at 08:23. Reason: Automerged Doublepost
rjburke377 is offline   Reply With Quote
Old 2008-08-05, 07:48   #72 (permalink)
MP Donator
 
Join Date: May 2008
Location: FlashFXP Development Team
Posts: 58
Thanks: 5
Thanked 1 Time in 1 Post

Country:


Default

Quote:
Originally Posted by s7oneyuk View Post
ok - as promised here is a script file that is really just a merge of the imdb_com and MovieXML scripts. It will basically download all the movie details from IMDB but will grab the artwork from moviexml.

sorry for the delay - seems like imdb.com were having some issues on friday meaning i could perform tests on the script until today!!.
Hello,

I have been using this script since posting my previous problems... It has been working great, with the exception of one bug/issue I have noticied.

If any sentance in the description/summary section starts with an I after a full stop, it will not recover any further words.

For example if the Summary was as follows.

"The bunny walked down the street and got hit by a truck. I "

Once the I starts a sentance, it will not recover anything further.

If you need more info let me know, it would be great to continue using your script s7oneyuk
Spaldo is offline   Reply With Quote
Old 2008-08-05, 09:47   #73 (permalink)
Portal Member
 
emphatic's Avatar
 
Join Date: Aug 2006
Location: Alingsås
Age: 34
Posts: 459
Thanks: 108
Thanked 17 Times in 16 Posts

Country:


Default

I've noticed the "I" phenomenon as well. I just thought it was badly updated info. Now I know better. Hope this can be fixed.

Emph
__________________
You're not the content of your wallet.
emphatic is online now   Reply With Quote
Old 2008-08-06, 12:20   #74 (permalink)
MP Donator
 
Join Date: Jul 2008
Age: 26
Posts: 23
Thanks: 3
Thanked 0 Times in 0 Posts

Country:

My System

Default

Quote:
Originally Posted by Spaldo View Post
Quote:
Originally Posted by s7oneyuk View Post
ok - as promised here is a script file that is really just a merge of the imdb_com and MovieXML scripts. It will basically download all the movie details from IMDB but will grab the artwork from moviexml.

sorry for the delay - seems like imdb.com were having some issues on friday meaning i could perform tests on the script until today!!.
Hello,

I have been using this script since posting my previous problems... It has been working great, with the exception of one bug/issue I have noticied.

If any sentance in the description/summary section starts with an I after a full stop, it will not recover any further words.

For example if the Summary was as follows.

"The bunny walked down the street and got hit by a truck. I "

Once the I starts a sentance, it will not recover anything further.

If you need more info let me know, it would be great to continue using your script s7oneyuk
thanks s7oneyuk for great script its awesome. but i have also the problem with the "I" phenomenon, hoping you can correct this =).

have a other question also, i am having problem to get database to find the movie "P2" why is that? when search on "P2" on The Internet Movie Database (IMDb) it hits as an Exact match. so if i want to add P2 i have to search tt0804516 and then it finds it.
swe_rush is offline   Reply With Quote
Old 2008-08-06, 19:54   #75 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 24
Thanks: 2
Thanked 11 Times in 5 Posts

Country:


Default

can you give me an example film name to look at for the 'I' problem. As for the other issue - this is also something i'm working on. Basically the script i produced was nothing more than an insert of the movie xml graphics with the imdb info. With the original imdb script it will return a list of Popular titles if they exist - if not it will then fall through to exact matches! This seems a bit daft to me - so i was going to re-work it based on popular and exact matches - probably in the other order though !!
s7oneyuk is offline   Reply With Quote
Old 2008-08-06, 23:01   #76 (permalink)
MP Donator
 
Join Date: Jul 2008
Age: 26
Posts: 23
Thanks: 3
Thanked 0 Times in 0 Posts

Country:

My System

Default

Quote:
Originally Posted by s7oneyuk View Post
can you give me an example film name to look at for the 'I' problem. As for the other issue - this is also something i'm working on. Basically the script i produced was nothing more than an insert of the movie xml graphics with the imdb info. With the original imdb script it will return a list of Popular titles if they exist - if not it will then fall through to exact matches! This seems a bit daft to me - so i was going to re-work it based on popular and exact matches - probably in the other order though !!
my titles are : Black Sheep, Colleage Road Trip, Drillbit Taylor, Good.Luck.Chuck , Mr.Magoriums.Wonder.Emporium, The.Water.Horse.Legend.of.the.Deep, Waiting < are the ones with the "I" and then just stop.

and another thing i noticed was that some of the plot/summarys ended with "..."
for example SAW IV
"Jigsaw and his apprentice Amanda are dead. Now, upon the news of Detective Kerry's murder, two seasoned FBI profilers... " < looks like that. but when check imdb there is much more information.

this happens to other movies aswell..
88 minutes, REC, SAW IV, stomp the yard.


as for the "P2" its the same with the original imdb script, it returns a list if titles but P2 isnt in it. never gotten that to work. just that movie :/

yes exact matches should be first alternative not popular.. would be nice if one could choose what option should come first.

Last edited by swe_rush; 2008-08-06 at 23:04.
swe_rush is offline   Reply With Quote
Old 2008-08-07, 10:09   #77 (permalink)
Portal Member
 
Join Date: Dec 2007
Posts: 24
Thanks: 2
Thanked 11 Times in 5 Posts

Country:


Default

actually the 'I' phenomenum is not a result of the script - but actually a result of imdb (its also actually a pipe character | not an i). The plot summary is taken from the Plot line in IMDB. (see Waiting... (2005) or College Road Trip (2008) for an example). The plot field in IMDB is user populated and is quite often very short. If you look at another example (Star Wars (1977)) you can see that the plot is short and if you drill into the full plotsummary (Star Wars (1977) - Plot summary) it contains multiple user entries for the plot. This has always been the problem with the imdb data for some fields.

The ... entries are if the plot is long and they dont want to waste real estate on the frontpage (Saw IV - Saw IV (2007)) but again if you drill into the plotsummary (Saw IV (2007) - Plot summary) there is more detail - in this case written by the production company. however - looking at the plotsummay for Star Wars (1977) you will see multiple entries all submitted by different imdb members! Which one would we pick!!!

I will get a new script cut that includes the exact matches 1st in the list and will also try to exclude films that are no-where near the title you are searching for.
s7oneyuk is offline   Reply With Quote
This User Say Thank You:
Old 2008-08-07, 11:02   #78 (permalink)
Portal Developer
 
gamejester's Avatar
 
Join Date: May 2007
Posts: 390
Thanks: 1
Thanked 25 Times in 17 Posts

Country:


Default

The movie-xml slash issue with quote has now been resolved by Zak so there is no need to use the newer script I posted any more, the old one works again now.

FYI - For those of you keen to get good covers working with the various different scrits out there I have nearly finished coding up a few things in myVideos which will achieve this.

1. IMPAwards cover search - enhance so it always finds the correct film + only pulls down 1 copy of each cover (currently adds 2 copies of the main cover to the list)
2. Cover search chooser - lets the user specify which cover search engine(s) they want to use.
3. More cover search engines. These will be moviexml, IMPawrds, Amazon, Folder (all the jpg's in the current folder), File (a jpg in the current folder that matches the name of the movie file)

In this way the script that grabs the movie text details is abstrcted from that the grabs the covers, and so will work with all in built searches and the cscript searches just need to remove any cover search section (unless you want to force overwrite this new method).

To make it backward compatible if you do not choose any cover searches then it will fall back to IMPAwards.

It is 90% complete already so should have something out by the weekend.
gamejester is offline   Reply With Quote
This User Say Thank You:
Old 2008-08-07, 12:17   #79 (permalink)
MP Donator
 
Join Date: Jul 2008
Age: 26
Posts: 23
Thanks: 3
Thanked 0 Times in 0 Posts

Country:

My System

Default

Quote:
Originally Posted by s7oneyuk View Post
looking at the plotsummay for Star Wars (1977) you will see multiple entries all submitted by different imdb members! Which one would we pick!!!
first maybe ? =) thats little tricky. is it possible to have the script ask user which one he/she prefeers ? if there ar multiple entries.
swe_rush is offline   Reply With Quote
Old 2008-08-07, 13:49   #80 (permalink)
Portal Developer
 
gamejester's Avatar
 
Join Date: May 2007
Posts: 390
Thanks: 1
Thanked 25 Times in 17 Posts

Country:


Default

IMDB plot summaries - it is for this reason (and others) I have switched to moviexml to provide the details; as the site is user driven someone has already got the 'best' descriptiong form IMDB and populated it into moviexml. why not just have 2 searches specified, have moviexml first (with will come with all 'modern' movies, it has 250k+ now) and IMDB second to pick up all the really old stuff.

Feel you are fitting a loosing battle with IMDB, no script is ever going to be able to pull back the data you want for every movie, like s7oneyuk says, if you look at 3 movies with multiple descriptions you would want a different ordered one for each, so how is a script ever going to devided that for you.............whereas on moviexml someone has already made that desission using human reasoning so you get better info back!
gamejester is offline   Reply With Quote
Reply

Bookmarks

Tags
grabbing, imdb, script, support

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
IMDB Grabber for german.imdb.com / deutsche IMDB mmf1981 Movie Info Grabbers 8 2008-10-21 15:42
IMDB & Poster Grabber v1.3 Datenshi Plugins 7 2008-09-23 11:49
IMDB Grabber for CSFD ... www.csfd.cz (czech alternative for IMDB) CXI Improvement Suggestions 0 2008-01-29 14:50
MyVidoes - Show IMDB info by default? NickSE General Support 1 2007-12-31 04:39
IMDB info during playback only if played thru IMDB info deebo The old Bugreport Forum 0 2006-07-20 22:20


All times are GMT +1. The time now is 19:46.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden