import with imdb script (ant 3.3.0)

If you need help on how to use the program
Post Reply
Guest

import with imdb script (ant 3.3.0)

Post by Guest »

i import my list from another file , but i wold like to get the info from imdb .
the thing is that i have only the imdb number of the title.
is there an option or a script that anyone improved that can grab all the data only by IMDB number or exact link to the title ?

is there an option to use the script so it will grab the info by the URL feild?
please contact me if u made a script to grab the info from imdb by number or exact link to the title
antp
Site Admin
Posts: 9712
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

If you have the IMDB number in any field, it is quite easy to modify the script.
E.g. if the number if in the "URL" field :

At the end of the script file, there is the following code:

Code: Select all

begin
  if CheckVersion(3,2,1) then
  begin
    MovieName := GetField(fieldOriginalTitle);
    if MovieName = '' then
      MovieName := GetField(fieldTranslatedTitle);
    if Input('IMDb Import', 'Enter the title of the movie:', MovieName) then
    begin     AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName));
    end;
  end else
    ShowMessage('This script requires a newer version of Ant Movie Catalog (at least the version 3.2.1)');
end.
Replace it with the following :

Code: Select all

begin
     AnalyzePage('http://us.imdb.com/Title?' + GetField(fieldURL));
end;
(so you can remove the version verification, not very useful)
Guest

are u sure ? do i need this function at all ? AnalyzePage

Post by Guest »

don't you think it would be better i use this function
AnalyzeMoviePage

can u tell me what is this TStringList stands for ?

i have another problem ...al the imdb id are saved as numbers resulting all the "0" b4 the numbers to be deleted ...the imdb id is 7 digits ..so i need to check each number and to add it "0" b4 the imdb number

any ideas ?

thanks for the quick answer ...your program is realy cool
antp
Site Admin
Posts: 9712
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

You can also use AnalyzeMoviePage, that will work the same way.

TStringList is a list of strings, I use it to store the page. Each line of the source code is available separately, but I can write the whole page to the TStringList by using the "Text" property of the TStringList.

For the numbers, here is a small sample (quickly made, there is maybe a better way, but since there are not lots of functions available in the script I do not know what to do else)

Code: Select all

program NewScript;
var
  s, nr: string;
  i: Integer;
begin
  nr := '3456';
  i := Length(nr);
  for i := 1 to 7 - Length(nr) do
  begin
    s := s + '0';
  end;
  s := s + nr;
  ShowMessage(s);
end.
Guest

thanks

Post by Guest »

u r the :grinking:
Guest

Post by Guest »

another small thing ....

i want this script to be fully automatic ...so my qestion is how do i change the Description parton the script so it would auto maticlay choose
1) if there is 1 comment then choose it
2)if there is more than 1 comment then choose comment no' 2 (even if there are 3+ comments)

please ...i realy need this ...i have a long list :)
Guest

Post by Guest »

comment = description on IMDB ...:)
antp
Site Admin
Posts: 9712
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

I'll modify the script for you tomorrow.
Guest

Post by Guest »

thanks :wink:
Guest

Post by Guest »

just to make sure we understand each other i ment

automatic description priority

1) choose Full plot outline
2) if no plot outline choose the first user comments
(what comes after "Sumarry:")

3)if none at all choose the Tagline


most of the movies have plot outline so i belieave the script will run faster if it would be directed to the PLOT? link and grab the first one there is there..automaticaly without asking me which to choose

thanks again for the quick respond
Guest

Post by Guest »

after reviewing imdb i saw i was mistaking ....

Full plot outline = Plot summary
antp
Site Admin
Posts: 9712
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

I am not sure to understand exactly what you want.
If you only want plot outline, simply put a // in front of the line GetDescriptions(Value);
Guest

Post by Guest »

i want the plot summary
the plot outline is actualy the first sentence of the plot summary

but not always there is a plot summary ...sometimes there is only Tagline and a user comments
antp
Site Admin
Posts: 9712
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

ok, if I have few free time (and if I do not forget) I will try to do that
Guest

Post by Guest »

great

any progresss?

remember there is a difference between Plot outline than Plot Summary

the plot summary is in the imdb ..../Plot?
(which is the one we want as 1st priority)

i didn't quite understood in the code what is the priority when you grab the description...
Post Reply