[REQ] IMDb - Production Companies field information

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
Khaeotica
Posts: 10
Joined: 2009-03-02 09:18:30
Location: Germany
Contact:

[REQ] IMDb - Production Companies field information

Post by Khaeotica »

Hi everyone!

As I use the script IMDB.ifs, I would like to also retrieve the information about the Production Companies from IMDb.com that is to be found not on the main page, but on the "company credits" page (so only the list of Production Companies info, not the one of Distributors), and to be saved in the Borrower field in the ANT program (in order to maintain a flip down list for companies). And the list of production companies in the ANT program should be displayed separated by commas!

I consider this info a very important part of a movie file, as much as the other fields already implemented are as well, and maybe there are also other people that would like this facility to be included into this script.

In this regard, could anyone help with the proper code and instructions where exactly should it be inserted, as my programming knowledge is kinda minimum? :) It would be much appreciated as it is needed!!!
Thanks in advance for any help!

Yours,
Julius.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Code: Select all

  // company credits
  if CanSetField(fieldBorrower) then
  begin
    FullValue := ConvertToASCII(GetPage(MovieURL+'/companycredits'));
    Value := TextBetween(FullValue, '<h2>Production Companies</h2>', '</ul>');
    Value := StringReplace(Value, '</li><li>', ', ');
    HTMLRemoveTags(Value);
    HTMLDecode(Value);
    SetField(fieldBorrower, Value);
  end;
This should do the job. Insert the code behind the MPAA rating block, but before the end; from line 609. I don't add it to current IMDB script, as it does not make sense for most people to keep that info on field borrower, but you should be able to add that again after script updates easily.
Khaeotica
Posts: 10
Joined: 2009-03-02 09:18:30
Location: Germany
Contact:

Post by Khaeotica »

Thanx a lot! It works great. :grinking:

Actually, I've changed it a bit, and after a short reconsideration I've chosen to set the Subtitles field as a storage place for this kind of information, and not the Borrower as initially planned, since I'm not using it anyway as my list represents the movies/series that I've seen so far and not my private collection of DVDs.

Maybe, in the future version of the ANT program, there will be a dedicated field called Production Company implemented somewhere near the ones of Director and Producer... hope so, at least :)

Once again, thank you so much for your help!!!
Post Reply