Page 1 of 1

MPAA importation, Please!

Posted: 2007-01-18 19:24:33
by GnomesRUs
I'm gonna try again, as I find from a search that it was April of 2006 since anyone asked about this (And there's still no reply to that query)

Has anyone written a script to import the MPAA rating from IMDb into your AMC catalog?

Is there anyone here that could tell me, lead me, point me in the right direction even, so that I could add it myself to the existing script?

It can replace one of the existing fields (I'm thinking Media Label, which I do not use anyway)

I'm fairly intelligent, and can program in high-level computer languages, like BASIC, so I might be able to do this :hihi:

Please help, someone - my catalog is now at 2,015 movies (and still growing), and I simply can't sit here and do this one-by-one...

Thank You in advance

Posted: 2007-01-18 22:47:20
by antp
The current IMDB script has an option for that. I do not remember if it is the version included in the current AMC setup, but if it is not, you can get it from www.antp.be/temp/scripts/

That version of the script was provided by Thermal Ions about one month ago: viewtopic.php?p=21697#21697
(and replaced the "official" IMDB script)

Posted: 2007-02-11 17:04:02
by GnomesRUs
Thank You so much for that link to the earlier forum message!

After downloading the modified script, looking at it completely, doing several searches through all forum messages, and a lot of experimentation with adding/deleting lines, I believe I finally have what I've wanted all along.

Code: Select all

  if CanSetField(fieldMedia) then
  begin
       
       Value := Trim(TextBetween(PageText, '<a href="/mpaa">MPAA</a>:</b>' , '<br>'));
       if Value <> '' then
       begin
         SetField(fieldMedia, Value);
       end;
This puts the MPAA Rating (Including the reason for the rating, ie; Sexual situations, Language, etc.) into the Media Label field, which was unused for me, anyway.

I then simply unchecked all fields except the Media Label field, and it's currently "going to town" downloading the MPAA ratings for all my movies (2,054)

I SO love your program :clapping:

And a big Thank You also to Thermal Ions for the script!

Posted: 2007-02-12 09:33:04
by Thermal Ions
Thanks...Glad it was useful to start you on the way to what you were looking for. I hadn't considered anyone wanting to put both the rating and the 'reason' in the one field - probably because I'm not from US so the 'reasons' don't really apply (I just get them for a rough guide on what to expect).

@Aussie users
I'd be interested if any Aussies have set up a script to get the correct/confirmed ratings from the Office of Film and Literature Classification Database (www.oflc.com.au)

Posted: 2007-02-22 00:03:31
by GnomesRUs
Heh heh - wouldn't you know it - just days after getting this all together, IMDb goes and changes the whole format of their pages, so I'm messed up again...

Maybe I can just 'incorporate' that modified part into KaraGarga's script...

Ah, such is life :cry:

Posted: 2007-02-22 18:55:47
by antp
It works quite well by replacing all occurences of "us.imdb.com" by "former.imdb.com" but maybe some fields are missed, and it will maybe not work for a long time (until I have to rewrite the script, I hope :D)