IMDB
Finished with picture, classification and MPAA rating. Now whole script should work. So I'll wait few days for bug reports, then I'll consider that script as being the "official" one.
https://forum.antp.be/users/antp/IMDB.ifs
https://forum.antp.be/users/antp/IMDB.ifs
-
- Posts: 58
- Joined: 2006-12-08 18:19:18
- Location: The Land Down Under
-
- Posts: 58
- Joined: 2006-12-08 18:19:18
- Location: The Land Down Under
Been testing out the script a little and came across problem of blank lines in beginning of Comments field, and IMDB TRIVIA heading not being correct (left over text from the actors list is inserted) if Comments field is blank.
Blank lines seems to be fixed by making a change at the end of the Comments section of code.
Change
to
IMDB TRIVIA Heading fixed by changing code towards end of the Trivia section.
Change
to
Cheers.......Thermal
Thermal's Movie db / TV Series db
Blank lines seems to be fixed by making a change at the end of the Comments section of code.
Change
Code: Select all
if (GetOption('CommentType') = 2) then
SetField(fieldComments, #13#10);
Code: Select all
if (GetOption('CommentType') = 2) then
SetField(fieldComments, '');
Change
Code: Select all
case GetOption('Trivia') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB TRIVIA: ' + Value
else
Value := 'IMDB ' + Value2 + ': ' + Value; // <-- changing this line
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB TRIVIA: ' + Value
else
Value := 'IMDB ' + Value2 + ': ' + Value; // <-- changing this line
SetField(fieldComments, Value);
end;
Code: Select all
case GetOption('Trivia') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB TRIVIA: ' + Value
else
Value := 'IMDB TRIVIA: ' + Value; // <-- changed this line
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB TRIVIA: ' + Value
else
Value := 'IMDB TRIVIA: ' + Value; // <-- changed this line
SetField(fieldComments, Value);
end;
Thermal's Movie db / TV Series db
Thanks. These were bugs due to some changes that I made (e.g. Value2 that I didn't use anymore) and I did not test all the cases. I'll apply your code directly
I moved the script to www.antp.be/temp/scripts/IMDB.ifs as I noticed that by mistake a previous temporary version of it was there Strange that nobody sent me report by e-mail about that script, as it was not working very well.
I moved the script to www.antp.be/temp/scripts/IMDB.ifs as I noticed that by mistake a previous temporary version of it was there Strange that nobody sent me report by e-mail about that script, as it was not working very well.
Firstly, thank you, antp, for updating the script.
Secondly, I think there's a problem with the Director/Writer part - the site adapts to the number (only one or more than one) of names, so if a movie has more than one Director/Writer, IMDb displays "Directors:/Writers:"
(for example: http://imdb.com/title/tt0249241/)
With "Director:/Writer:" in the script, it wouldn't import the names after "Directors:/Writers:", would it?
Secondly, I think there's a problem with the Director/Writer part - the site adapts to the number (only one or more than one) of names, so if a movie has more than one Director/Writer, IMDb displays "Directors:/Writers:"
(for example: http://imdb.com/title/tt0249241/)
With "Director:/Writer:" in the script, it wouldn't import the names after "Directors:/Writers:", would it?
-
- Posts: 1
- Joined: 2007-04-11 17:22:11
- Location: Belgium
Hi,
I'm new to this forum but I'm using your Movie Catalog software for many years now and I'm VERY CONTENT with it :-)
Without this fine piece of software my DVD-VHS catalog would be unmanageable!
Especially the zweckform_4737 print option is very neat :-)
Many thanks for your new IMDB-script antp !
I'm new to this forum but I'm using your Movie Catalog software for many years now and I'm VERY CONTENT with it :-)
Without this fine piece of software my DVD-VHS catalog would be unmanageable!
Especially the zweckform_4737 print option is very neat :-)
Many thanks for your new IMDB-script antp !
-
- Posts: 58
- Joined: 2006-12-08 18:19:18
- Location: The Land Down Under
Been at it again - fiddling with antp's IMDB script.
I found that a spoiler warning sometimes appears in the Trivia list, and presently isn't dealt with very cleanly. To tidy it up insert, the following line:
as follows:
I've also been looking at IMDB's new page layout, and decided it would be pretty easy to adapt antp's Trivia code to have the script also download the Goofs, Crazy Credits, and Movie Connections. So if you want to add this functionality, then feel free to add all of the below sections of code:
I've got too many other personal tweaks in my IMDB script to just link a replacement file - sorry. It's tested on over 150 movies so you could possibly consider implementing it in the standard script if you like Ant.
At the end of the [Options] section:
After the existing call to the Awards procedure, add similar calls to the the new Goofs, Crazy Credits, and Movie Connections procedures:
And finally add the following procedures between the end of the ImportAwards procedure and the "// ***** beginning of the program *****"
Cheers.......Thermal
Thermal's Movie & TV Series db
I found that a spoiler warning sometimes appears in the Trivia list, and presently isn't dealt with very cleanly. To tidy it up insert, the following line:
Code: Select all
Value := StringReplace(Value, '>>> WARNING: Here Be Spoilers <<<', #13#10 + '>>> WARNING: Here Be Spoilers <<< ');
Code: Select all
Value := StringReplace(Value, '<li>', #13#10 + '- ');
Value := StringReplace(Value, '>>> WARNING: Here Be Spoilers <<<', #13#10 + '>>> WARNING: Here Be Spoilers <<< ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
case GetOption('Trivia') of
I've got too many other personal tweaks in my IMDB script to just link a replacement file - sorry. It's tested on over 150 movies so you could possibly consider implementing it in the standard script if you like Ant.
At the end of the [Options] section:
Code: Select all
Goofs=2|0|0=Do not import goofs|1=Import goofs to Description field, after the summary|2=Import goofs to Comments field, after the comments
MovieConnections=2|0|0=Do not import movie connections|1=Import movie connections to Description field, after the summary|2=Import movie connections to Comments field, after the comments
CrazyCredits=2|0|0=Do not import crazy credits|1=Import crazy credits to Description field, after the summary|2=Import crazy credits to Comments field, after the comments
Code: Select all
// Awards
if (GetOption('Awards') > 0) then
begin
ImportAwards();
end;
// Goofs
if (GetOption('Goofs') > 0) then
begin
ImportGoofs();
end;
// Crazy Credits
if (GetOption('CrazyCredits') > 0) then
begin
ImportCrazyCredits();
end;
// Movie Connections
if (GetOption('MovieConnections') > 0) then
begin
ImportConnections();
end;
Code: Select all
// Procedure - ImportGoofs
procedure ImportGoofs;
var
FullValue, Value : string;
begin
sleep(50);
Value := MovieUrl;
FullValue := GetPage(Value+'/goofs');
Value := TextBetween(FullValue, '<ul class="trivia">', '<div align="center"> <!--');
if Value <> '' then
begin
Value := StringReplace(Value, #13#10, '');
while Pos(' ', Value) > 0 do
Value := StringReplace(Value, ' ', '');
while Pos('<li> ', Value) > 0 do
Value := StringReplace(Value, '<li> ', '<li>');
Value := StringReplace(Value, '<li>', #13#10 + '- ');
Value := StringReplace(Value, '>>> WARNING: Here Be Spoilers <<<', #13#10 + '>>> WARNING: Here Be Spoilers <<< ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
case GetOption('Goofs') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB GOOFS: ' + Value
else
Value := 'IMDB GOOFS: ' + Value;
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB GOOFS: ' + Value
else
Value := 'IMDB GOOFS: ' + Value;
SetField(fieldComments, Value);
end;
end;
end;
end;
// Procedure - CrazyCredits
procedure ImportCrazyCredits;
var
FullValue, Value : string;
begin
sleep(50);
Value := MovieUrl;
FullValue := GetPage(Value+'/crazycredits');
Value := TextBetween(FullValue, '<pre>', '</pre>');
if length(Value) > 4 then
begin
Value:= StringReplace(Value, #13#10, ' ');
while Pos(' ', Value) > 0 do
Value := StringReplace(Value, ' ', '');
Value := StringReplace(Value, '<br><br>', #13#10 + '- ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
Value := '- ' + FullTrim(Value);
case GetOption('CrazyCredits') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB CRAZY CREDITS: ' + #13#10 + Value
else
Value := 'IMDB CRAZY CREDITS: ' + #13#10 + Value;
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB CRAZY CREDITS: ' + #13#10 + Value
else
Value := 'IMDB CRAZY CREDITS: ' + #13#10 + Value;
SetField(fieldComments, Value);
end;
end;
end;
end;
// Procedure - ImportConnections
procedure ImportConnections;
var
FullValue, Value : string;
begin
sleep(50);
Value := MovieUrl;
FullValue := GetPage(Value+'/movieconnections');
Value := TextBetween(FullValue, '<div id="tn15content">', '<div align="center"> <!--');
if Value <> '' then
begin
Value := StringReplace(Value, #13#10, '');
while Pos(' ', Value) > 0 do
Value := StringReplace(Value, ' ', '');
Value := StringReplace(Value, '<h5>', #13#10);
Value := StringReplace(Value, '</h5>', ':' + #13#10);
Value := StringReplace(Value, '<br/>', #13#10);
Value := StringReplace(Value, ' - ', '- ');
HTMLRemoveTags(Value);
HTMLDecode(Value);
Value := FullTrim(Value);
case GetOption('MovieConnections') of
1:
begin
if GetField(fieldDescription) <> '' then
Value := GetField(fieldDescription) + #13#10 + #13#10 + 'IMDB MOVIE CONNECTIONS: ' + #13#10 + Value
else
Value := 'IMDB MOVIE CONNECTIONS: ' + #13#10 + Value;
SetField(fieldDescription, Value);
end;
2:
begin
if GetField(fieldComments) <> '' then
Value := GetField(fieldComments) + #13#10 + #13#10 + 'IMDB MOVIE CONNECTIONS: ' + #13#10 + Value
else
Value := 'IMDB MOVIE CONNECTIONS: ' + #13#10 + Value;
SetField(fieldComments, Value);
end;
end;
end;
end;
Thermal's Movie & TV Series db