IMDB Script not working

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.
kalimagdora
Posts: 63
Joined: 2009-03-11 14:36:10
Location: Hungary

Post by kalimagdora »

Hi
I only have 1 question:
a 4.002 ver. At the beginning there was such linest in the script:
// ***** Manually set UserCountry to your required Classification Country below *****
const
UserCountry = 'Hungary';
{ Put a "//" in front of the line here above and remove the "//" in front
of one the wanted country (or add yours if not listed) }
//UserCountry = 'United States';
//UserCountry = 'Canada';
//UserCountry = 'Mexico';
//UserCountry = 'Brazil';
//UserCountry = 'Argentina';
//UserCountry = 'Australia';
//UserCountry = 'India';
//UserCountry = 'Italy';
//UserCountry = 'Spain';
//UserCountry = 'Portugal';
//UserCountry = 'France';
//UserCountry = 'Germany';
//UserCountry = 'Netherlands';
//UserCountry = 'United Kingdom';
//UserCountry = 'Ireland';
//UserCountry = 'Finland';
//UserCountry = 'Norway';
//UserCountry = 'Sweden';
//UserCountry = 'Switzerland';

I set it up in Hungary and the Hungarian title appeared in the transleted tittle field
I do not know where to set this in the new version. 4.004

I do not know how to write ore change a script at all. I'm ignorant of a script case. :)
If you write exactly what and where to do, it will usually succeed.
With your second description, the writer and producer also succeeded. Have a goood day THX
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

@herman >
Using many variables numbered make the code really difficult to read (and correct later). I remember the old script (v2) that become impossible to maintain with the time.
So in cases like this if it cannot be done with the existing Value, Value2 & FullValue variables, isolating the part in a separate function and declaring variables with explicit names would be better.
edit: and in the same way, for importing producers and writers with their "role", that should be handled in a more generic way like actors, to avoid duplicating code and also using options for users to chose if the info is included or not. I'll try to integrate that better later then.
Last edited by antp on 2017-12-29 20:07:35, edited 1 time in total.
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

kalimagdora wrote: I set it up in Hungary and the Hungarian title appeared in the transleted tittle field
I do not know where to set this in the new version. 4.004
You do not have to go in the code any more for that.
On the right of the window, below the "script options" box there are "script parameters": double-click on "UserCountry" and type "Hungary" in that box.
kalimagdora
Posts: 63
Joined: 2009-03-11 14:36:10
Location: Hungary

Post by kalimagdora »

... and a miracle happened - the Hungarian title was finally replaced the transleted tittle field :grinking:

I'm very thankful



You do not have to go in the code any more for that.
On the right of the window, below the "script options" box there are "script parameters": double-click on "UserCountry" and type "Hungary" in that box.[/quote]
joske
Posts: 4
Joined: 2018-01-28 13:40:02
Location: Belgium

Post by joske »

Bonjour,

Mon admiration et mes reerciements à Antoine et aux autres concepteurs et collaborants de ce merveilleux logiciel. C’est l’outil parfait que je cherche pour créer ma vidéothèque de passionné de cinéma. Par contre, je ne suis pas informaticien et ne sais pas faire des scripts.
Or, je voudrais un complément dans le script IMDB. EN PLUS du titre original et du titre traduit (français pour moi), je voudrais pouvoir importer :
• Le titre espagnol dans un champ personnalisé « Titre VE »
• Le titre original alternatif dans un champ personnalisé « Autre titre original »
• Le titre français alternatif (France (alternative title)) dans un champ personnalisé « Autre titre VF »
• Le titre espagnol alternatif (Spain (alternative title)) dans un champ personnalisé « Autre titre VE »
J’ai comrpis qu’il faut utiliser des lignes de code avec SetCustomField(Titre VE) dans la partie AKA Name du script ou copier des lignes de code avec SetField(fieldTranslatedTitle), mais je ne sais pas comment faire.
Pouvez-vous m’aider SVP ?
doctormaligno
Posts: 10
Joined: 2008-02-01 02:17:43

Post by doctormaligno »

Thanks a lot for that language easy fix, antp!

Wow, you are amazing, you keep and keep improving this great software.

Thank you so much for your work. Bravo!
AnthonyB
Posts: 19
Joined: 2011-08-20 07:27:50

Post by AnthonyB »

In the last few days I've started to get some 'bad' movie description scrapes using the IMDB script.

I'm using AMC 4.2.1.2 and IMDB script v4.004

Two movies where I've hit this problem are:

Jigsaw (2017)
http://www.imdb.com/title/tt3348730/

Morgan (2016)
http://www.imdb.com/title/tt4520364/

What I get in the Description field is literally an entire scrape of the raw HTML of the page.

For example, this is what I get with Jigsaw movie:

Code: Select all

Plot Synopsis Plot Keywords copycat-killer one-word-title torture suicide suicide-by-hanging See All (316) » Taglines Are you worthy? See more » Genres Crime Horror Mystery Thriller Parents Guide View content advisory » Certification Argentina:16 Australia:R18+ Australia:MA15+ Belgium:KNT/ENA Brazil:18 Canada:18A (Alberta/British Columbia/Manitoba/Ontario) Canada:16+ (Quebec) Chile:18 Finland:K-16 France:16 Germany:18 Hong Kong:III Hungary:18 India:UA Indonesia:21+ Ireland:18 Italy:VM14 Japan:R15+ Malaysia:(Banned) Mexico:C Netherlands:16 New Zealand:R18 Norway:18 Peru:14 Philippines:R-16 Portugal:M/18 Russia:18+ Singapore:M18 South Korea:18 Sweden:15 Switzerland:16 Turkey:18+ United Kingdom:18 United States:R Additional Details Edit Also Known As Décadence: l'héritage (Canada, French title) Jigsaw: Saw Legacy (Japan, English title) Saw 8 (World-wide, English title) Saw VIII (Spain) Jogos Mortais: Jigsaw (Brazil) See more » Runtime 92 min Official Sites Official Facebook Official Site Country United States Canada Language English Color Color Aspect Ratio 2.35 : 1 See more » Sound Mix Dolby Atmos Filming Locations Toronto, Ontario, Canada See more » Box Office Budget $10,000,000 (estimated) Opening Weekend United States $16,640,452, 29 Oct 2017 Did You Know? Edit Trivia Jigsaw (2017) was shot in Toronto, Canada in 2016. It started filming on September 26, the birthday of Gustavo Goulart, who was originally accepted for a leading role in the movie but was soon replaced, because his work visa would not be issued in time. However, Gustavo Goulart released his audition on YouTube as a short movie called Walking After You (2016). See more » Goofs Detective Hunt says that Logan was captured in Fallujah after taking out three Talibans, which is impossible because Fallujah is in Iraq, while Talibans are in Afganistan. See more » Movie Connections FollowsSaw (2004). See more » Soundtracks Never Fade Away See more » Quotes John Kramer: The truth will set you free. See more » if ('csm' in window) { csm.measure('csm_TitleContributeWidget_started'); } Getting Started |Contributor Zone » Contribute to This Page Edit page if ('csm' in window) { csm.measure('csm_TitleContributeWidget_finished'); } doWithAds(function(){if ('cornerstone_slot' != 'injected_slot') {ad_utils.register_ad('top_rhs');}}); ad feedbackdoWithAds(function(){ad_utils.inject_serverside_ad('top_rhs', 'document.defaultAd = {h:250,w:300}; document.ad = document.defaultAd; document.ad={aid:\"6444854970402\",cid:\"2876468610402\",w:\"0\",h:\"0\"};\n\n \n \n \n');}, "ad_utils not defined, unable to inject serverside ad"); Details Full Cast and Crew Release Dates Official Sites Company Credits Technical Specs Storyline Taglines Plot Summary Synopsis Plot Keywords Parents Guide Did You Know? Trivia Goofs Crazy Credits Quotes Alternate Versions Connections Soundtracks Photo & Video Photo Gallery Trailers and Videos Opinion Awards FAQ User Reviews User Ratings External Reviews Metacritic Reviews TV TV Schedule Related Items News Showtimes External Sites Share this page: if (typeof uet == 'function') { uet('bb', 'facebook_like_iframe', {wb: 1}); } doWithAds(function(){if ('cornerstone_slot' != 'injected_slot') {ad_utils.register_ad('rhs_cornerstone');}}); doWithAds(function(){if ('cornerstone_slot' == 'injected_slot') {ad_utils.inject_ad.register('rhs_cornerstone');} else {ad_utils.gpt.render_ad('rhs_cornerstone');}}, "ad_utils not defined, unable to render client-side GPT ad or injected ad.");doWithAds(function(){if ('cornerstone_slot' != 'injected_slot') {ad_utils.register_ad('btf_rhs2');}}); doWithAds(function(){if ('cornerstone_slot' == 'injected_slot') {ad_utils.inject_ad.register('btf_rhs2');} else {ad_utils.gpt.render_ad('btf_rhs2');}}, "ad_utils not defined, unable to render client-side GPT ad or injected ad."); Clear your history Recently Viewed   IMDb Everywhere Find showtimes, watch trailers, browse photos, track your Watchlist and rate your favorite movies and TV shows on your phone or tablet!
It doesn't occur with every movie I scrape. For example, this one scraped fine:

Mr Nice (2010)
http://www.imdb.com/title/tt1183911/
herman
Posts: 15
Joined: 2017-12-25 11:02:29

Post by herman »

both mentioned movies imported OK for me.
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

I also have the problem, when DescriptionSelection = 1.
When it is =0, there is an unwanted "See more" at the end of the description.
I'll try to take a look to it.
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

I updated the script to fix these description problems (version 4.005)
At the same time I fixed a problem with a "See more" sometimes visible in the description or tagline. It is difficult to track because it also depends on the "ConvertToAscii" option.
That problem may still appear in fields like country, languages, etc. when the option to have multiple values is set - in such case please report an example of movie for which it happens.

Now instead of garbage in case of a missing long description it tries to take the short one (e.g. like "Jigsaw"). There is a longer summary on a separate page (no idea why it is not on http://www.imdb.com/title/tt3348730/reference which the script uses) but further changes are required in the script for that.

For future description/tagline problems, please include info about which DescriptionSelection and ConvertToAscii option you have set.
AnthonyB
Posts: 19
Joined: 2011-08-20 07:27:50

Post by AnthonyB »

antp wrote:I updated the script to fix these description problems (version 4.005)
At the same time I fixed a problem with a "See more" sometimes visible in the description or tagline. It is difficult to track because it also depends on the "ConvertToAscii" option.
That problem may still appear in fields like country, languages, etc. when the option to have multiple values is set - in such case please report an example of movie for which it happens.

Now instead of garbage in case of a missing long description it tries to take the short one (e.g. like "Jigsaw"). There is a longer summary on a separate page (no idea why it is not on http://www.imdb.com/title/tt3348730/reference which the script uses) but further changes are required in the script for that.

For future description/tagline problems, please include info about which DescriptionSelection and ConvertToAscii option you have set.
Thanks Ant, the 4.005 script has resolved the issue for me.

For reference, my settings are:
DescriptionSelection=1
ConvertToAscii=0
herman
Posts: 15
Joined: 2017-12-25 11:02:29

Post by herman »

interesting, i am getting IO handler value is not valid error on each movie now.

when i am on line with GetPage function.
LeMoi
Posts: 171
Joined: 2006-04-09 11:26:43

Post by LeMoi »

I have the same error but not for every movie... For example "Le redoutable" no error, "Louise en hiver" error
herman
Posts: 15
Joined: 2017-12-25 11:02:29

Post by herman »

hmm, now it stopped, strange.
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Maybe a temporary problem on IMDb's side, that happens.
istanbulccc
Posts: 5
Joined: 2018-02-10 21:08:28

interesting problem

Post by istanbulccc »

Hello, as of today I am starting to experience an interesting problem.
For example:
2009 Construction A Success Story (tt1446817) movie, information to search for Original Title and year, I find "Mary and Max (tt0978762)" movie.

I have the same problems outside this movie.
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

:??: I don't understand what you mean
joske
Posts: 4
Joined: 2018-01-28 13:40:02
Location: Belgium

Post by joske »

Bonjour,

pouvez-vous m'aider au moins pour obtenir en plus du titre original et du titre traduit (français pour moi), le titre espagnol dans un champ personnalisé « Titre VE » ?

Merci d'avance
AnthonyB
Posts: 19
Joined: 2011-08-20 07:27:50

Post by AnthonyB »

herman wrote:interesting, i am getting IO handler value is not valid error on each movie now.
I've just started getting this same error.

I get it twice every time I run the script on a movie and the script fails to retrieve "Comments".
herman
Posts: 15
Joined: 2017-12-25 11:02:29

Post by herman »

yep, again IO handler error, again getpage function

PageText := ConvertToASCII(GetPage(Address));

Dont know what is imdb doing again...
Post Reply