IMDB batch script with multiple categories, rating+votes

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
Guest

IMDB batch script with multiple categories, rating+votes

Post by Guest »

Here is a modified IMDB batch import script i made to fit my taste. Mayme there is something in it for you too :)
There are several modifications:
  • * imports multiple categories
    * uses the URL field to find the movies (if present)
    * always imports the short description. Even if concise, it often catches best the substance of the movie. A longer description is appedded after the short one.
    * Import exact imdb ratings and number of votes. It displays them in the comments field with a 'visual' bar. The scale for the votes bar is logarithmic (ranges from 30 to 80000). It is now easy to search for movies based on the number of votes. Just search for something like 'Votes [:::::::::::::::::::::::::::' in the Comments. See the pic to see how i mean.


Here is how it looks.

Image

You can get it from here:
http://www.fysik4.fysik.uu.se/~adi/IMDB-batch-adi.ifs
Guest

Post by Guest »

Nice idea, Well done :grinking:

I used it with the sample database of amc (also made a new db with only the movie names) and here are the problems I encountered with your improvements...

- Evolution: No imdb ratings and number of votes imported, only comments
- Taxi: No Description imported

I'm sure the above can help you find the source of the problem and fix it ;)


Thanks adi! :clapping:
kolia
Posts: 56
Joined: 2003-02-19 16:02:46

Post by kolia »

...
I would also consider Enabling the ImportURL flag at the beggining as default. It is always helpfull to know from where you got the info you imported...

I'll also try it on my actual database and list the problems I encounter :)
Guest

Post by Guest »

hmm, it seems that the " * uses the URL field to find the movies (if present) " routine doesn't work :(

movie "Evolution" that I mentioned above returns the first found (X-Men Evolution TV Series) That is actually not a problem but when I tried to fix it by replacing the URL I figured out that the direct URL import didn't work.

here is a working version of the routine (place at the and of the .ifs file replacing the existing one) :)

Code: Select all

begin
  if CheckVersion(3,4,0) then
begin
    if pos(GetField(FieldURL),'imdb.com') > 0 then
  begin
    MovieName := GetField(fieldOriginalTitle);
    if MovieName = '' then
     MovieName := GetField(fieldTranslatedTitle);
    if MovieName = '' then
     MovieName := Input('IMDb Import', 'Enter the title of the movie:', MovieName);
    if MovieName <> '' then
    begin
     AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName));
    end;
  end
  else
  begin
    AnalyzePage(GetField(fieldURL));
  end;
end else
  ShowMessage('This script requires a newer version of Ant Movie Catalog (at least the version 3.4.0)');
end. 
kolia
Posts: 56
Joined: 2003-02-19 16:02:46

Post by kolia »

:mad: I get a little angry everytime I get logout out and I can't edit my post...!

anyway, I forgot to replace

Code: Select all

    if pos(GetField(FieldURL),'imdb.com') > 0 then
with

Code: Select all

  if GetField(fieldURL) = '' then
above, thus giving

Code: Select all

begin
  if CheckVersion(3,4,0) then
begin
  if GetField(fieldURL) = '' then
  begin
    MovieName := GetField(fieldOriginalTitle);
    if MovieName = '' then
     MovieName := GetField(fieldTranslatedTitle);
    if MovieName = '' then
     MovieName := Input('IMDb Import', 'Enter the title of the movie:', MovieName);
    if MovieName <> '' then
    begin
     AnalyzePage('http://us.imdb.com/Tsearch?title='+UrlEncode(MovieName));
    end;
  end
  else
  begin
    AnalyzePage(GetField(fieldURL));
  end;
end else
  ShowMessage('This script requires a newer version of Ant Movie Catalog (at least the version 3.4.0)');
end.
the previous also worked, but only because pos(GetField(FieldURL),'imdb.com') always returned 0 (zero).
but it was missleading... :badidea:
This code only works if the URL is empty or correctly entered. otherwise it returns a page not found error...
voivod9
Posts: 5
Joined: 2003-04-22 10:53:05

Post by voivod9 »

Hi!

It's me who posted the script.

Just discovered that there was a silly mistake in it, thanks for testing it!
instead of

Code: Select all

if pos(GetField(FieldURL),'imdb.com') > 0 then
should have been

Code: Select all

if pos('imdb.com',GetField(FieldURL)) > 0 then
Sorry for that. I also put
ImportURL = True;
by default. You can download the upadted version at the original link.

The script can find the movies based on the title field, but i don't reccomend that. Better run an interactive script on the movies before to fill in the url field, import pics and such.
My script is automated so it won't ask for imput if there are multiple choices. But if the url is there, then should be no problems with it. (this time i hope)

cheers
kolia
Posts: 56
Joined: 2003-02-19 16:02:46

Post by kolia »

ok, I just checked it and it runs fine ;)

I'll be away for a while, so don't await feedback from me soon, but I'm sure more people will appreciate your work on this one !

Cheers! :grinking:
stalemate
Posts: 3
Joined: 2003-06-21 19:28:37
Location: istanbul

timeouts

Post by stalemate »

i mostly get read timeout errors. first i think my slow connection may cause it. but the original batch script worked fine. anyway i like the script much...
KaBeCi
Posts: 23
Joined: 2003-08-29 15:28:19

Post by KaBeCi »

large picture import doesnt work :(
lac21

errors

Post by lac21 »

Hi!
There is a problem with importing links and description.
Imdb uses new title form I think that's the problem.
Here is a snapshot:
Image

Could you correct it please????
thx
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

I corrected the IMDB scripts in last update.
If you use another script you have to update it yourself on the basis of the "official" scripts, because I really do not have time to update all the variants of the scripts :/
Guest

Post by Guest »

could someone fix this script? i tried to replace codes from antp's updated scripts and it didn't work
Post Reply