Page 1 of 1

import with imdb script (ant 3.3.0)

Posted: 2002-07-08 17:20:31
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

Posted: 2002-07-08 18:26:46
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)

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

Posted: 2002-07-08 21:43:18
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

Posted: 2002-07-08 21:52:17
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.

thanks

Posted: 2002-07-08 22:01:38
by Guest
u r the :grinking:

Posted: 2002-07-08 22:11:29
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 :)

Posted: 2002-07-08 22:12:48
by Guest
comment = description on IMDB ...:)

Posted: 2002-07-08 22:15:14
by antp
I'll modify the script for you tomorrow.

Posted: 2002-07-08 22:35:40
by Guest
thanks :wink:

Posted: 2002-07-09 00:58:40
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

Posted: 2002-07-09 01:09:19
by Guest
after reviewing imdb i saw i was mistaking ....

Full plot outline = Plot summary

Posted: 2002-07-09 07:35:52
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);

Posted: 2002-07-09 13:29:37
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

Posted: 2002-07-09 16:42:46
by antp
ok, if I have few free time (and if I do not forget) I will try to do that

Posted: 2002-07-09 19:05:20
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...