Page 2 of 2

Posted: 2002-10-16 15:43:00
by antp
Yes, I may add that
But I haven't lots of time for that currently.
It is not a heavy change so I will try to add that this weekend (at least a "sleep" function)

Posted: 2002-10-16 15:45:46
by phaelox
ok, thanks.

Posted: 2002-10-22 19:48:38
by antp
I updated the program, and added the "sleep" function
I added it in the "IMDB (batch)" script included with the update.

Posted: 2002-10-22 22:26:23
by phaelox
way to go, thanks :cool:

Posted: 2002-10-24 00:06:00
by SuperflyTNT
wow, man what can I say but thank you!!! mannn, thanks for the support ya guyz give in this forum ;) phae and antp you guyz kick ass! ;)

Posted: 2002-11-05 17:18:10
by Guest
MMmmm I've got often 2 kind of error message with this wonderfull batch script ...

The first is : "Script error IMDB at position 7515 (out of range)"
It's at the
// Rating
if ImportRating then
begin
LineNr := FindLine('User Rating:', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr + 4);
if Pos('awaiting', Line) = 0 then
begin
BeginPos := pos('<b>', Line) + 3;
Value := IntToStr(Round(StrToInt(StrGet(Line, BeginPos), 0) + (StrToInt(StrGet(Line, BeginPos + 2), 0) / 10)));
SetField(fieldRating, Value);
end;
end;
end;

The second is a Time Out error even with a greater value for the sleep ... What's wrong doctor ? :)

Thx for all this improvements

Posted: 2002-11-05 18:34:01
by antp
For the first one, could you say me with which movie you get the error ?

For the second one, I cannot really help, I guess that it is a poor connection that causes this, you may try at a different time of the day, when IMDB server receives less requests.

Posted: 2002-11-10 00:13:11
by SuperflyTNT
yeah that error seems to occur when the script runs into a movie with less than 5 votes, or whatever that is, where the IMDB doesn't have enough votes to have a rating yet. Those movies give the error, for instance:
http://amazon.imdb.com/Title?0293555

and yeah the last problem is still the connection errors that come on occassion, although less than before (since the sleep).

is there a way to retry or automaticalled have it choose "ok" on those?

THANKS again, this is awesome ;)

Posted: 2002-11-10 11:28:33
by antp
search for the line

Code: Select all

if Pos('awaiting', Line) = 0 then
and remplace it by

Code: Select all

if Pos('/10', Line) > 0 then

Posted: 2002-11-12 11:51:53
by colonelz0
Waow!! Great job ;)
I just discovered the tool and the scripts. So much time saved.
Thanks guys :)

phaelox' script

Posted: 2002-11-13 11:37:34
by zolee
your script is very usefull :grinking: I hate all those questions...
I tryed to modify it a bit:
when the URL is already set than get that page, don't search by the title...
////////////////////////
....
IMDBlink := GetField(fieldURL);
if IMDBlink<>'' then
begin
AnalyzePage(IMDBlink);
end else begin

MovieName := GetField(fieldOriginalTitle);
....
/////////////////////////////

but the problem is that fieldURL always returns an empty string even if it is not.
Can anyone tell me where am I wrong?

Posted: 2002-11-13 13:08:06
by antp
Do you call the script with "Get information -> From script" of by "Tools -> Scripting" ?
In the first case you cannot access to existing fields.

Posted: 2002-11-18 15:41:25
by zolee
I am using "Get information -> From script". I don't know why it is not possible to access those fileds... you may have a good reason to hide them but 10x anyway... I will try "scripting". :cool:

Posted: 2002-11-18 16:03:12
by antp
It was to make the detection of modified fields more easy (so only modified fields are checked in the "Results" page)
But for next version I will try to make something better ;)

Posted: 2002-11-18 16:12:05
by zolee
Thank you for your time, I appreciate your work and providing the catalog structure was very useful for me... I'm working on a PHP script that reads the info from the catalog and generates a html(hope to be able to implement the generation from the already existent templates). I think it is a better idea than exporting in hundreds of htmls... of course it needs a server with PHP.

Posted: 2002-11-18 16:38:38
by antp
I am curious, could you give me the PHP script that you made to read the file ? :)
I wanted to make one, but if you accept I could give yours with the program... (of course I will leave name or url in the header comments of the file if you want)

Posted: 2002-11-18 16:46:09
by zolee
That's not a problem, I give it to you once I finish it, but I am very busy in these days and don't have too much time to spend with it, but I'll do my best ;)
I only have one questions regarding the structure... I wasn't able to figure out how you store the date...
I read a number like 37555 and have no idea how it will become 10/26/2002.

Posted: 2002-11-18 17:41:09
by antp
It's Borland's TDateTime
Since it is an Integer is it only a Date (Time = decimal part)
From Borland's help file :
The integral part of a TDateTime value is the number of days that have passed since 12/30/1899

Posted: 2003-02-16 13:28:27
by RaceBoy
well i think that is sometinig missing in this batch script...
maybe im wrong but pictures cant be imported...maybe couse of this:

batch code:

// Picture
if ImportPicture then
begin
LineNr := FindLine('<img alt="cover" align="left" src="http://posters.imdb.com/', Page, 0);
if LineNr < 0 then
LineNr := FindLine('<img alt="cover" align="left" src="http://images.amazon.com/', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
BeginPos := pos('src="', Line) + 4;
Delete(Line, 1, BeginPos);
EndPos := pos('"', Line);
Value := copy(Line, 1, EndPos - 1);
if ImportLargePicture then
Value := StringReplace(Value, 'MZZZZZZZ', 'LZZZZZZZ');
GetPicture(Value, False); // False = do not store picture externally ; store it in the catalog file
end;
end;


and normal (pic) code:

// Picture
if ImportPicture then
begin
LineNr := FindLine('<img alt="cover" align="left" src="http://ia.imdb.com/media/imdb/', Page, 0);
if LineNr < 0 then
LineNr := FindLine('<img alt="cover" align="left" src="http://posters.imdb.com/', Page, 0);
if LineNr < 0 then
LineNr := FindLine('<img alt="cover" align="left" src="http://images.amazon.com/', Page, 0);
if LineNr > -1 then
begin
Line := Page.GetString(LineNr);
BeginPos := pos('src="', Line) + 4;
Delete(Line, 1, BeginPos);
EndPos := pos('"', Line);
Value := copy(Line, 1, EndPos - 1);
if ImportLargePicture then
Value := StringReplace(Value, 'MZZZZZZZ', 'LZZZZZZZ');
GetPicture(Value, False); // False = do not store picture externally ; store it in the catalog file
end;
end;


as u can see is missing http://ia.imdb.com/media/imdb/ ...and pictures cant be grabed from there...

i hope this could help

Posted: 2003-02-16 14:09:49
by antp
I should compare this batch script with the two "normal" IMDB scripts, because I forgot to update it when I updated the others, I think.