IMDB script doesn't work

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.
antp
Site Admin
Posts: 9693
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: IMDB script doesn't work

Post by antp »

MrObama2022 wrote: 2025-06-18 00:10:35 There are a lot of a code to check, test, add, etc. but if you want to test ..
Thank you very much for your work!
Do you continue to work on it?
I guess it would be counter-productive to both work at the same time on it, as the changes would overlap.
But if I can help for something, I can try.

I suppose we could already publish that script as an updated version of the older one? It is better anyway than the one which does not work, even if it is not finished.
antp
Site Admin
Posts: 9693
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: IMDB script doesn't work

Post by antp »

Line 606-607 (in AMC),

Code: Select all

      if (fieldName = fieldLength) then
        FieldValue := IntToStr(StrToInt(GetParam('MaxActors'), 10) / 60);
I assume that the use of GetParam here is a copy/paste mistake as it makes no sense :)
The purpose is to convert the duration from seconds to minutes. In Pascal/Delphi, "/" is for floating-point numbers, so it generates an error. For an integer division you have to use "div", so:

Code: Select all

      if (fieldName = fieldLength) then
        FieldValue := IntToStr(StrToInt(fieldValue, 10) div 60);
This fixes import of length info
MrObama2022
Posts: 70
Joined: 2022-02-02 00:03:55

Re: IMDB script doesn't work

Post by MrObama2022 »

Thank you, antp, and thank you humungus for your feedback.

Yes, I'll continue to work on it to finish. I'll ask for your help to improve details because I never used a lot of iMDB options so I don't know which values are expected.

Consider the new page format maybe does not contain all the info of the previous format, so I still don't know if I can replace 100% of parameters with the new page.

Now I need an ice-cream and a coffee to wake up, I'll update asap.
Dorohedoro
Posts: 55
Joined: 2016-12-13 00:45:45

Re: IMDB script doesn't work

Post by Dorohedoro »

MrObama2022 wrote: 2025-06-18 16:42:29 Thank you, antp, and thank you humungus for your feedback.

Yes, I'll continue to work on it to finish. I'll ask for your help to improve details because I never used a lot of iMDB options so I don't know which values are expected.

Consider the new page format maybe does not contain all the info of the previous format, so I still don't know if I can replace 100% of parameters with the new page.

Now I need an ice-cream and a coffee to wake up, I'll update asap.
Thanks for you hard work and amazing first try.

Some issues I've found:

Is ignoring the following options:

ActorsLayout option 0
Awards option 0
ImageKind option 3

Is not importing the Rating of any movie and is not importing the Producers of some movies.
MrObama2022
Posts: 70
Joined: 2022-02-02 00:03:55

Re: IMDB script doesn't work

Post by MrObama2022 »

Thank you Dorohedoro.

Here a new version, 5.0 beta 2

CHANGELOG
* fixed Length (AMC error)
* fixed Producers (sometime missing)
* fixed Composers (sometime missing)
* fixed Writers (sometime missing)
* added rating (and UserRatings)
* added ActorsLayout
* added AllActors

To do:
* Awards
* check/add all the options from Awards to TranslatedTitle (and MAYBE I could ask for help because I don't know how all these options worked before)
* TESTTTTTTTTTTTTTTTTTT
Valmiki
Posts: 12
Joined: 2023-11-20 21:14:07

Re: IMDB script doesn't work

Post by Valmiki »

MrObama2022 wrote: 2025-06-18 16:42:29 Thank you, antp, and thank you humungus for your feedback.

Yes, I'll continue to work on it to finish. I'll ask for your help to improve details because I never used a lot of iMDB options so I don't know which values are expected.

Consider the new page format maybe does not contain all the info of the previous format, so I still don't know if I can replace 100% of parameters with the new page.

Now I need an ice-cream and a coffee to wake up, I'll update asap.
Thank you so much Mr Obama for your super job. If you are not living far away I will definitely invite you for a coffee. I live near Perugia.
Anyway you really made my day.

I tried to import 2 new movies and I see that now it all works again. Yuppi.

I noticed some fields previously mentioned in previous posts (I will write them again) and some I found out. I wanted to make a simple test with a previously imported movie where I had all following values imported ... and that now aren't imported anymore. Hope it helps:

Directors
Composer
Producer
Writer
IMBD Rating
MOVIE Rating

If I can do something more. Don't hesitate to ask.
MrObama2022
Posts: 70
Joined: 2022-02-02 00:03:55

Re: IMDB script doesn't work

Post by MrObama2022 »

Here a new version, 5.0 beta 3

CHANGELOG
* added GetTagline
* added MPAA
* added MultipleValuesAudioFormat
* added MultipleValuesCategory
* added MultipleValuesCountry
* added MultipleValuesLanguages
* added Trivia

To do/check:
* Awards
* BatchMode
* CommentType
* ConverToASCII
* DescriptionSelection
* EpisodeTitleSearch
* ImageKind
* PopularSearches
* UserRatings
* MediaType
* TranslatedTitle
* TESTTTTTTTTTTTTTTTTTTTTTTTT

How to help:
1. if you see a bug, please tell me: IMDB URL, RECEIVED VALUES, EXPECTED VALUES (example: https://www.imdb.com/it/title/tt0112714/ , RECEIVED VALUES: Director: Lepage, EXPECTED VALUES: Director: Robert Lepage). This is useful because I have the url to do the same test and I know which value you get and which value you want.
2. Test the "to do/check" options and tell me if they work or not. BatchMode, EpisodeTitleSearch, PopularSearches maybe could work as usual, can you test? Can you give me any example how DescriptionSelection should work (please give me examples: URLS and EXPECTED VALUES)?


@Valmiki: let speak in italian. Amico mio non siamo neanche lontanissimi di casa e mi fa piacere conoscerti. Venirti a trovare però può essere complicato, sento mia moglie che sbuffa a letto perché non sono lì da lei e sono qui a programmare e un giorno di questi si potrebbe vendicare ... meglio non pensarci ... teniamo duro e cerchiamo di portare questa lavorazione a conclusione. Off topic: ma tu non usi Italian Multisite? E' come usare Imdb con però la descrizione in italiano (aggiornerò italian multisite non appena finisco qui) ...
humungus
Posts: 27
Joined: 2010-03-23 00:29:01

Re: IMDB script doesn't work

Post by humungus »

Many thanks again, MrObama2022, for your quick fixes.

I tried the same two movies again, as well as https://www.imdb.com/title/tt2716778/reference/ (an episode of "Endeavour") and while all the previously missing data (writer, composer, producer...) was now retrieved for all three titles, there is one issue: the actors' tags are missing. Which is to say:

credits such as

Geneviève Bujold Dr. Susan Wheeler (as Genevieve Bujold)
Philip Baker Hall Doctor (uncredited)

end up as

Geneviève Bujold ... Dr. Susan Wheeler
Philip Baker Hall ... Doctor

The now defunct script kept those tags and I find them quite useful. Again, I'm using ActorsLayout = 4 and AllActors = 1 (all possible actors). If there's anything you can do about this it would be great.

movie URLs:
https://www.imdb.com/title/tt0077355/reference/
https://www.imdb.com/title/tt0112714/reference/
(and also the "Endeavour" episode above)

Meanwhile, I have 35 movies due for an update, and I guess this will be a good test of your script, albeit with limited options I use. I'll let you know how it goes.
MrObama2022
Posts: 70
Joined: 2022-02-02 00:03:55

Re: IMDB script doesn't work

Post by MrObama2022 »

Ok, I just tested this movie using your settings and I get:

Paul Venables ... Prof Alistair Coke Norris
Shaun Evans ... DC Endeavour Morse
Louise Dylan ... Judy Vallens
Guy Williams ... Jolyon Frobisher
Lloyd McGuire ... Charlie Ayres
Jamie Glover ... Dr. Ian Kern
Sean Rigby ... PC Jim Strange
Poppy Miller ... Millicent Coke Norris
Roger Allam ... DI Fred Thursday
Sara Vickers ... Joan Thursday
Anton Lesser ... Chief Superintendent Reginald Bright
James Bradshaw ... Dr. Max DeBryn
Jack Laskey ... DS Peter Jakes
Abigail Thaw ... Dorothea Frazil
Chris Barnes ... Albert Gudgeon
Richard Hawley ... Morris Cubitt
Kelly Adams ... Cynthia Riley
Clive Wood ... Vic Kasper
Nick Court ... Vince Kasper
Lynda Rooke ... Gwen Morse
Sonya Cassidy ... Joyce Morse
Alan Williams ... Cyril Morse
Caroline O'Neill ... Win Thursday
Edmund Kingsley ... Mark Carlisle
Marilyn O'Brien ... Prue Carter
John Hollingworth ... Taxi Driver
Greg Bennett ... Police Constable
Rachel D'Arcy ... Lila Pilgrim - Nightclub Singer
Colin Dexter ... Don at Booth Hill Debate
Alexandra Doyle ... Georgina Bannard
Hugh O'Brien ... Recital Guest
Chris Wilson ... Firearms Instructor

Now, can you copy & paste here the correct result, that is, how all this should appear? I think the difference could be in


John Hollingworth ... Taxi Driver(as John Hollingsworth)

is this right?
MrObama2022
Posts: 70
Joined: 2022-02-02 00:03:55

Re: IMDB script doesn't work

Post by MrObama2022 »

Ok, new version here: 5.0 beta 4

CHANGELOG
* added ImageKind (but with less option, see notes below)
* added UserRatings
* added MediaType
* added TranslatedTitle

Note: ImageKind now supports only 3 modes: 0 (no image), 1 or 2 (smaller image, without strong size check), 3 or 4 or 5 (poster image without size check)

This should/could work, please double check:
- batchmode (not modified)
- converttoascii (not modified)
- episodetitlesearch (not modified but it seems an old option no more used, @antp can you confirm?)
- PopularSearches (not modified)
- MediaType and MediaTypeParameter (not modified but it seems an old option no more used, @antp can you confirm?)

I need examples for:
- DescriptionSelection (URL, examples, ...)

To do:
* check Awards
* check CommentType
* TESTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

Waiting for your feedback and humungus reply.

For ImageKind please tell me, if you know, where can I get "no poster icon", dvd merchandise images, sales images and how to choose images based on width preferences (I have an idea, I can use iMDB to reduce the main bigger poster image at any width but is this ok for you?)
boristhecat
Posts: 76
Joined: 2015-06-30 22:25:21

Re: IMDB script doesn't work

Post by boristhecat »

I just tried the script 5.0 Beta 4.
The only thing missing from my normal result is Certification.
All the video and audio details are missing, but I don't normally get them anyway.
There's a properly sized thumbnail and a bigger .jpg when you click the thumbnail. The cast list is the same as I always get,
Julianne Moore (as Kate Garretson), Sydney Sweeney (as Claire Garretson), Domhnall Gleeson (as Jackie Lawson), etc
In a nutshell, Certification of the movie is the only thing missing that I normally get.
Munkey
Posts: 2
Joined: 2025-06-19 04:55:29

Re: IMDB script doesn't work

Post by Munkey »

Tested "5.0 beta 4", I got "Argentina" in Description:

https://www.imdb.com/title/tt27729779

Code: Select all

Argentina

A thrilling physical journey that allows an approach to the darkness, where it is scary to look. It appeals to the viewer's civil responsibility and forces them to face the limits of their own solidarity.
"TranslatedTitle" only "1" option works, and there is an issue with it, it repeats the original title in the translated title field if there is no translated title, it should be empty.

"LargePictureHeight" doesn't work.
MrObama2022 wrote: 2025-06-19 00:32:09 For ImageKind please tell me, if you know... ...how to choose images based on width preferences
Same method as in "function ImportLargePicture"
Example how a link should look:
https://m.media-amazon.com/images/M/MV5 ... 20_AL_.jpg
Last edited by Munkey on 2025-06-19 06:06:45, edited 2 times in total.
Lemaireus
Posts: 93
Joined: 2014-02-14 10:18:14

Re: IMDB script doesn't work

Post by Lemaireus »

MrObama2022 wrote: 2025-06-19 00:32:09 Ok, new version here: 5.0 beta 4

Note: ImageKind now supports only 3 modes: 0 (no image), 1 or 2 (smaller image, without strong size check), 3 or 4 or 5 (poster image without size check)

For ImageKind please tell me, if you know, where can I get "no poster icon", dvd merchandise images, sales images and how to choose images based on width preferences (I have an idea, I can use iMDB to reduce the main bigger poster image at any width but is this ok for you?)
MrObama, thank you very much for getting the script up and running. I checked out v.5.0 beta 4 and the script successfully imports the most important fields.

Here are the areas that still need work:

1. The script does not import 'certification' / MPAA rating.
2. The description field imports the first line of text and cuts off the rest of the text. [PS: I just checked another title and this time around all the text was imported just fine.]
3. As you point out, the picture import options have been narrowed down in ImageKind. It would be great if we could please get back the default 720p size picture import in the 'large picture' option of ImageKind.

I do not use batchmode, concerttoascii etc. which you left untouched so someone else will have to reveal whether they work or not.

Thank you so very much for such splendid work. Thanks to the IMDB script, my catalogue is up and firing all cylinders again. :clapping:
Valmiki
Posts: 12
Joined: 2023-11-20 21:14:07

Re: IMDB script doesn't work

Post by Valmiki »

Hello
I confirm with Lemaireus on point 1 and 2
About point 3. I used to use Italian Multisite script coz the picture quality was already low at least for me. Now that also that script doesn't work I keep seeing the same low quality image. Not sure if it is correct according to the script but it sure would be great to have a good definition.

I still don't get the Directors and I am testing my last movie that used the script: https://www.imdb.com/title/tt0356150
I expect this: Jeff Schaffer, Alec Berg, David Mandel
And the result as mentioned above is empty

Now I am off to work but tomorrow night I might have some time to check other fields that I don't usually use but that might be of interest to others.

Thank you so much Mr Obama for your hard work
Valmiki
Posts: 12
Joined: 2023-11-20 21:14:07

Re: IMDB script doesn't work

Post by Valmiki »

Correction!

Having a break and wanted to try something quick.

About point 3, I checked the parameters and for some reason mine were wrong, not as I left them last time. Reset them to 3=IMDB large image and to me it works nicely.
It is true though that the image is narrower compare to the original but in my case so are all the actors images. Not sure if it is my html template, it was always like that.
Sorry for the confusion.
antp
Site Admin
Posts: 9693
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: IMDB script doesn't work

Post by antp »

MrObama2022 wrote: 2025-06-19 00:32:09 Ok, new version here: 5.0 beta 4
Thanks for the work! :grinking:
I'll start uploading these to the server, as it will allow more people to already use it.
Munkey
Posts: 2
Joined: 2025-06-19 04:55:29

Re: IMDB script doesn't work

Post by Munkey »

Quick hack to get "LargePictureHeight" working, replace these 678 & 679 lines in "5.0 beta 4":

Code: Select all

    if (fieldName = 0) then
      GetPicture(FieldValue)
with:

Code: Select all

    if (fieldName = 0) AND (GetOption('ImageKind') = 3) then
    begin
      FieldValue := TextBefore(FieldValue, '._', '') + '._V1_SY' + GetParam('LargePictureHeight') + '_AL_.jpg';
      GetPicture(FieldValue)
    end
    else if (fieldName = 0) then
    begin
      GetPicture(FieldValue)
    end

I think this whole script needs to be rewritten to something more modern instead of getting stuff from HTML elements.
humungus
Posts: 27
Joined: 2010-03-23 00:29:01

Re: IMDB script doesn't work

Post by humungus »

Yes, Mr.Obama2022, for the "Endeavour" episode (https://www.imdb.com/title/tt2716778)

John Hollingworth ... Taxi Driver (as John Hollingsworth)

is the expected result (though I added a space there :) ). The other two I listed in my previous post are for the movie https://www.imdb.com/title/tt0077355 (which has quite a few instances of such credits, I listed just two examples).

As for the rest, Certification is not retrieved (not related to MPAA script options - I've always had this set to 0; it should return 'PG' for the movie in question), PopularSearches = 1 seems to work as before, and I don't use DescriptionSelection. I use RapidAPI for Trivia and TranslatedTitle and these work fine.

I did, for the movie above, try GetTagline = 1 and both DescriptionSelection options. I observed only one tagline was retrieved (three are listed on https://www.imdb.com/title/tt0077355/taglines/), and in both cases the same description was retrieved (namely the first paragraph/summary on https://www.imdb.com/title/tt0077355/plotsummary/ - I have no idea what it's supposed to retrieve as long description).
Post Reply