MPAA importation, Please!

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
GnomesRUs
Posts: 41
Joined: 2005-08-30 18:10:10
Location: U.S.A.

MPAA importation, Please!

Post 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
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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)
GnomesRUs
Posts: 41
Joined: 2005-08-30 18:10:10
Location: U.S.A.

Post 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!
Thermal Ions
Posts: 58
Joined: 2006-12-08 18:19:18
Location: The Land Down Under

Post 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)
GnomesRUs
Posts: 41
Joined: 2005-08-30 18:10:10
Location: U.S.A.

Post 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:
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post 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)
Post Reply