IMDB script

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.
alebleicker
Posts: 4
Joined: 2010-03-13 16:55:02

Post by alebleicker »

bad4u wrote:
alebleicker wrote:I'm trying to make the IMDB script load cover images but in big size, not the very small ones it usually does. Is there a way to do this or I'll need to modify the script? I'm researching a lot about but I couldn't find an answer for this issue.
Open scripting window and click on IMDB script once (so that it is marked blue). Now there should be a "Script options" frame on the right side of the window. Doubleclick on option "ImageKind" and change it to 4 or 5 for import of larger pictures, but not all movies will have links to large pictures (at least I guess so).
Thanks for the tip with this setting. Yeah, there are lots of movies without anything on merchandising links and dvd retail pictures, but is there a option to use the pictures from the main screen? There is always a small picture and when you click on it, displays a higher resolution picture.

Do you believe I can use this image instead of the others?

Thanks !
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

alebleicker wrote:Thanks for the tip with this setting. Yeah, there are lots of movies without anything on merchandising links and dvd retail pictures, but is there a option to use the pictures from the main screen? There is always a small picture and when you click on it, displays a higher resolution picture.

Do you believe I can use this image instead of the others?
No, because IMDB blocks download of full size pictures to some applications. But I added a new option to script version 3.58 for largest size that is available for import (set option ImageKind to 3, image size will be somewhere between small and full size then). Script update will be available soon from http://update.antp.be/amc/scripts/ and through script "Update Scripts".
alebleicker
Posts: 4
Joined: 2010-03-13 16:55:02

Post by alebleicker »

bad4u wrote:
alebleicker wrote:Thanks for the tip with this setting. Yeah, there are lots of movies without anything on merchandising links and dvd retail pictures, but is there a option to use the pictures from the main screen? There is always a small picture and when you click on it, displays a higher resolution picture.

Do you believe I can use this image instead of the others?
No, because IMDB blocks download of full size pictures to some applications. But I added a new option to script version 3.58 for largest size that is available for import (set option ImageKind to 3, image size will be somewhere between small and full size then). Script update will be available soon from http://update.antp.be/amc/scripts/ and through script "Update Scripts".
Thanks for your help developing it! Do you think that we could use an external web site just to retrieve covers? one site that always has all covers in very good size is http://www.impawards.com. Perhaps I could be useful to fetch big covers. What do you think?

Thanks again for your help!
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

alebleicker wrote:Thanks for your help developing it! Do you think that we could use an external web site just to retrieve covers? one site that always has all covers in very good size is http://www.impawards.com. Perhaps I could be useful to fetch big covers. What do you think?
There is an older script for impawards available, but I don't know if it still works or needs to be updated.
alebleicker
Posts: 4
Joined: 2010-03-13 16:55:02

Post by alebleicker »

bad4u wrote:
alebleicker wrote:Thanks for your help developing it! Do you think that we could use an external web site just to retrieve covers? one site that always has all covers in very good size is http://www.impawards.com. Perhaps I could be useful to fetch big covers. What do you think?
There is an older script for impawards available, but I don't know if it still works or needs to be updated.
I didn't notice that there was a impawards script, I've just used and worked fine.

I'll try to learn a bit about these scripts to help you guys in developing, perhaps use impawards on all scripts as a image setting if everyone agrees.

Thanks again!
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

alebleicker wrote:I'll try to learn a bit about these scripts to help you guys in developing, perhaps use impawards on all scripts as a image setting if everyone agrees.
It is possible to collect results from two websites with one scripts only, but in most cases you will need to run search function for both websites separately and select the movie on both results lists then. Only if one website refers/links each movie to another website it is possible to run search function only once (e.g. combined OFDB/IMDB script).
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Note: New script version 3.58 is available for download from update server now. Support for larger pictures added (set script option ImageKind to 3)
Lownes
Posts: 2
Joined: 2010-03-17 14:02:39

IMDB script troubles

Post by Lownes »

Anyone else having problems with the IMDB script today?

All enquiries to IMDB are returning a 'No movie found for this search' message. IMDB urls entered directly still work, and I've fiddled with the script and made a little progress, but it's all a bit hit and miss.

I've installed the latest version of AMC and updated the script to no effect, so I'd be grateful for any advice.

The change I made to the script was:
PopularTitleSearchURL = 'http://us.imdb.com/find?tt=1;q='; to
PopularTitleSearchURL = 'http://us.imdb.com/find?q=';
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

I'll try to find some time tonight and do some more tests, in the meantime just change

Code: Select all

  PopularTitleSearchURL =  'http://us.imdb.com/find?tt=1;q=';
  FullTitleSearchURL = 'http://us.imdb.com/find?more=tt;q=';
  EpisodeTitleSearchURL = 'http://www.imdb.com/find?s=tt;ttype=ep;q=';
to

Code: Select all

  PopularTitleSearchURL =  'http://www.imdb.com/find?tt=1;q=';
  FullTitleSearchURL = 'http://www.imdb.com/find?more=tt;q=';
  EpisodeTitleSearchURL = 'http://www.imdb.com/find?s=tt;ttype=ep;q=';
(just change the us.imdb.com to www.imdb.com and it should work again, atleast the basics - seems IMDB deleted some subdomains, as they don't work on browsers anymore, too)
Lownes
Posts: 2
Joined: 2010-03-17 14:02:39

Thank you

Post by Lownes »

Thanks for the quick response; your fix is working just fine for me!
antp
Site Admin
Posts: 9652
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

updated script uploaded to the server, with all us.imdb.com replaced (not just these two), just in case of...
X__Alien
Posts: 1
Joined: 2010-03-22 00:50:51

Post by X__Alien »

i downloaded today the most recent script version for imdb but im still having this problem when getting info from the movies. It doesn't get the director name, running time, rating and a few other things.

Does anyone knows why? Thanks.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

X__Alien wrote:i downloaded today the most recent script version for imdb but im still having this problem when getting info from the movies. It doesn't get the director name, running time, rating and a few other things.

Does anyone knows why? Thanks.
Import of all these fields work for me on latest script version. Make sure you really use latest script version 3.59 (see below), if you still have problems give an example please, maybe it's just for specific movies.

Check version number on scripting window (click on the script and see version in the info box below the list). If it shows an older version it might load an previous script version from VirtualFolder.

If you are using Vista or Win7 with UAC (User Account Control) I recommend using script [Update Scripts] to download latest updates, as it will automatically overwrite older script versions on your VirtualFolder.

If you prefer manually updating the scripts to program's folder you will have to make sure that there is no older script version on your hidden VirtualFolder, as Windows will access files from this location first.


Note: It seems import of 10 most useful user reviews does not work, I'll fix that tonight.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

New script version 3.60 will be available from http://update.antp.be/amc/scripts/ and through using script [Update Scripts] from within AMC soon.

v3.60 fixes broken import of 10 most useful user reviews and broken import of audio/sound mixes information.
antp
Site Admin
Posts: 9652
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Thanks, it is now on the server
dodo
Posts: 2
Joined: 2010-03-31 19:52:57

Post by dodo »

Hi, is it possible to get full credits for writer and director fields? I managed to direct the script to /fullcredits page but because i know nothing about scripting, I couldn't manage to remove "explanations" like: 'uncredited', 'written by' and such. The result is a garbled mess. Can anyone direct me so that these fields look like the actors field, with names separated by commas and nothing else.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

dodo wrote:Hi, is it possible to get full credits for writer and director fields? I managed to direct the script to /fullcredits page but because i know nothing about scripting, I couldn't manage to remove "explanations" like: 'uncredited', 'written by' and such. The result is a garbled mess. Can anyone direct me so that these fields look like the actors field, with names separated by commas and nothing else.
Well, you would have to delete all the additional information that is between the parenthesis and the empty parenthesis (could be done with "StringReplace" function), then replace the linebreaks with commas to get the names into one line (again with StringReplace, linebreaks are "#13#10"). Easiest way for understranding how StringReplace function works is to look one up in the script for a import function, and compare it with corresponding HTML code from website - once you understand what it does, it's quite easy, even if you don't know much about the script programming language. On the help file there is a chapter script files creation that pops up when you hit help button on script editor, it's worth a closer look, too. I can't explain much better, as there is just no option for that in current script. Maybe I'll add that some day, but any additional option is one option more that might break and needs to be fixed later ;)

You might post your results so far and I might be able to help improving it then.

Note: Just saw that default import of director/writer imports the "(more)" from website, I'll fix this one tomorrow.
dodo
Posts: 2
Joined: 2010-03-31 19:52:57

Post by dodo »

ok something like this would work both for director and writer fields i guess:
// Writer (Producer Field)
if CanSetField(fieldProducer) then
begin
if GetOption('Producer') = 1 then
begin
Value := TextBetween(PageText, 'Produced by</a></h5>', '</table>');
FullValue := '';
Value2 := TextBetween(Value, '<a href="/name/', '</a>');
while Value2 <> '' do
begin
Value := RemainingText;
Value2 := TextAfter(Value2, '">');
if FullValue <> '' then
FullValue := FullValue + ', ';
FullValue := FullValue + Value2;
Value2 := TextBetween(Value, '<a href="/name/', '</a>');
end;
HTMLDecode(FullValue);
SetField(fieldProducer, FullValue);
end
else
begin
Value := MovieUrl;
FullValue := ConvertToASCII(GetPage(Value+'/fullcredits'));
Value := TextBetween(FullValue, 'Writing credits', 'Cast');
if Pos(':<', Value) > 0 then
Value := '<' + TextAfter(Value, ':<');
if Pos('<p>', Value) > 0 then
Value := TextBetween(Value, '<p>', '</p>');
Value := StringReplace(Value, ' ', ',');
Value := StringReplace(Value, '>more<', '><');
HTMLRemoveTags(Value);
HTMLDecode(Value);
if Value <> '' then
begin
Value := StringReplace(Value, '(WGA)', '');
Value := StringReplace(Value, '(screenplay)', '');
Value := StringReplace(Value, '(book)', '');
Value := StringReplace(Value, ' &', '');
Value := StringReplace(Value, ' ', '');
Value := StringReplace(Value, #13, ', ');
Value := StringReplace(Value, #10, ', ');
Value := StringReplace(Value, #9, ', ');
Value := StringReplace(Value, 'and', '');
Value := StringReplace(Value, ',', ', ');
Value := FullTrim(StringReplace(Value, ' and, ', ', '));
if Value <> '' then
while StrGet(Value, Length(Value)) = ',' do
begin
Delete(Value, Length(Value), 1);
Value := FullTrim(Value);
end;
SetField(fieldProducer, Value);
end;
end;
end;
of course much more additional information must be entered for script to delete.
4saken
Posts: 1
Joined: 2010-04-02 13:41:47

Post by 4saken »

Hi there,

I have no idea of editing scripts so i ll need your help. I open
http://update.antp.be/amc/scripts/IMDB.ifs and then what?I just copy the whole text and paste it in the script editor after deleting the whole text there?
If not what should i do to get rid of the not movie found error?
Thank you!:)
antp
Site Admin
Posts: 9652
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

As written at the top of http://update.antp.be/amc/scripts/
To download a script, click on its link with the right mouse button and select "Save target" or "Save link". Then save the file in the "Scripts" folder where Ant Movie Catalog is installed, eventually overwriting the old script having the same name.
Alternatively, you can copy/paste the contents, but there is a header part not shown in AMC editor, so you can't do that with AMC editor: you would have to use Notepad or similar.
But easiest solution to get scripts from there is to run "update scripts" script.
Post Reply