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.
joeray6948
Posts: 2
Joined: 2017-12-18 18:41:05

Post by joeray6948 »

Comments field just show "USER COMMENTS". Nothing is filled in this field.
LeMoi
Posts: 171
Joined: 2006-04-09 11:26:43

Post by LeMoi »

Thanks for the update, it looks everything has been fixed :)
phil5660
Posts: 40
Joined: 2017-12-24 08:59:17

Post by phil5660 »

Thank you for this update ! Everything seems fine, except for the "actors" field : only 3 or 4 actors are downloaded...
Merry Christmas and a Happy New Year !
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

joeray6948 wrote:Comments field just show "USER COMMENTS". Nothing is filled in this field.
Yes that's still in the to-do list
phil5660 wrote:Everything seems fine, except for the "actors" field : only 3 or 4 actors are downloaded...
cf this change:
antp wrote: I modified the "AllActors" option so 0 = stars from the top of the page, as the old 0 option had no use anymore (we import all info from the "/reference" movie page and not from the main movie page)
Options 1 and 2 still take respectively all actors and first 10 actors (number configurable via a constant in the script, in case you were previously using AllActors=0 for getting the first 15 actors).
Radagast
Posts: 15
Joined: 2016-04-22 16:07:15

Post by Radagast »

Import of Original title not work fine in all the movies I try, always import this text before the translated title (for me translated it's Spanish), year and original title

Find industry contacts & talent representationManage your photos, credits, & moreShowcase yourself on IMDb & AmazonGo to IMDbPro | Help Sign in with Facebook Other Sign in options doWithAds(function(){if ('injected_slot' != 'injected_slot') {ad_utils.register_ad('injected_navstrip');}}); doWithAds(function(){if ('injected_slot' == 'injected_slot') {ad_utils.inject_ad.register('injected_navstrip');} else {ad_utils.gpt.render_ad('injected_navstrip');}}, "ad_utils not defined, unable to render client-side GPT ad or injected ad."); if (typeof uet == 'function') { uet("ne"); } doWithAds(function(){if ('injected_slot' != 'injected_slot') {ad_utils.register_ad('injected_billboard');}}); doWithAds(function(){if ('injected_slot' == 'injected_slot') {ad_utils.inject_ad.register('injected_billboard');} else {ad_utils.gpt.render_ad('injected_billboard');}}, "ad_utils not defined, unable to render client-side GPT ad or injected ad."); La espada del dragón (2011) Long men fei jia

http://www.imdb.com/title/tt1686784/reference
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

For me it works fine, except an accent problem if I set "UserCountry" to 'Spain'.
Do you have the version 4.002 of the script?
If so, can you send me the contents of the HTML page via e-mail? (in a zip file, either do a Save As and select to save the page without images, or copy/paste what is in the "view source" of your browser)
As IMDb tends to change the contents based on the country, maybe there is a small detail that cause a problem in the script.
TickTock
Posts: 1
Joined: 2017-12-24 18:26:46

Post by TickTock »

Photos are no longer being scraped in 4.001 or 4.002. When 4.001 was first released the photos were being scraped, I updated today because 4.001 stopped working but 4.002 isn't scraping photos either.
LeMoi
Posts: 171
Joined: 2006-04-09 11:26:43

Post by LeMoi »

It worked fine yesterday, but I have the same error today, when trying for example the movie 'Bigfoot Junir', I have
Find industry contacts & talent representationManage your photos, credits, & moreShowcase yourself on IMDb & AmazonGo to IMDbPro | Help Sign in with Facebook Other Sign in options doWithAds(function(){if ('injected_slot' != 'injected_slot') {ad_utils.register_ad('injected_navstrip');}}); doWithAds(function(){if ('injected_slot' == 'injected_slot') {ad_utils.inject_ad.register('injected_navstrip');} else {ad_utils.gpt.render_ad('injected_navstrip');}}, "ad_utils not defined, unable to render client-side GPT ad or injected ad."); if (typeof uet == 'function') { uet("ne"); } doWithAds(function(){if ('injected_slot' != 'injected_slot') {ad_utils.register_ad('injected_billboard');}}); doWithAds(function(){if ('injected_slot' == 'injected_slot') {ad_utils.inject_ad.register('injected_billboard');} else {ad_utils.gpt.render_ad('injected_billboard');}}, "ad_utils not defined, unable to render client-side GPT ad or injected ad."); Bigfoot Junior (2017) The Son of Bigfoot
Radagast
Posts: 15
Joined: 2016-04-22 16:07:15

Post by Radagast »

antp wrote:For me it works fine, except an accent problem if I set "UserCountry" to 'Spain'.
Do you have the version 4.002 of the script?
If so, can you send me the contents of the HTML page via e-mail? (in a zip file, either do a Save As and select to save the page without images, or copy/paste what is in the "view source" of your browser)
As IMDb tends to change the contents based on the country, maybe there is a small detail that cause a problem in the script.
Yes Antoine, I used the v4.002.
I send eMail to U at site-contact@antp.be with HTML page and view source text.

Merry Christmas,
Juan
kalimagdora
Posts: 63
Joined: 2009-03-11 14:36:10
Location: Hungary

Post by kalimagdora »

Hi,

I used the new v4.002 script, it worked so far, but it was wrong this morning:

picture import and a translated tittle doesn't work


thx
antp wrote:I posted a version 4.002 that should fix:
- actors layout
- special characters
- MPAA/Certification
- original/translated title
There may still be problems though, as again I tested only with a few entries

I modified the "AllActors" option so 0 = stars from the top of the page, as the old 0 option had no use anymore (we import all info from the "/reference" movie page and not from the main movie page)
Options 1 and 2 still take respectively all actors and first 10 actors (number configurable via a constant in the script, in case you were previously using AllActors=0 for getting the first 15 actors).
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Indeed the picture is now not found, I'll check that later.

I don't have the title problem myself but I'll try to check that with the HTML sent by Radagast.
By the way, can you also send me the code of the page of the AKA titles, i.e. http://www.imdb.com/title/tt1686784/releaseinfo#akas ? As the problem is maybe rather from there.
phil5660
Posts: 40
Joined: 2017-12-24 08:59:17

Post by phil5660 »

I modified the "AllActors" option so 0 = stars from the top of the page, as the old 0 option had no use anymore (we import all info from the "/reference" movie page and not from the main movie page)
Options 1 and 2 still take respectively all actors and first 10 actors (number configurable via a constant in the script, in case you were previously using AllActors=0 for getting the first 15 actors).
Sorry, I'm a newbie and don't really understand much about what you did/wrote. Is there any hope to get a new IMdB script that will download the first 15 actors ?
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

In the script window, click the "Editor" tab, somewhere in the first page you'll see a line MaxActors = 10; where you can change the number to 15 (keep the semicolon at the end), then click the "Save" icon.
In the next version I'll try to use script parameters to make that easier to change (and also to allow to remember the value, as here it will be lost at the next script update).
phil5660
Posts: 40
Joined: 2017-12-24 08:59:17

Post by phil5660 »

I changeg the 33th line of the script to:
MaxActors = 15;

but nothing changes. Still download the 3 first actors for any movie...

Maybe because it is imported from the "/reference" movie page ???

Many thanks for your help !!!
herman
Posts: 15
Joined: 2017-12-25 11:02:29

Post by herman »

for poster to work just update one line in ImportLargePicture function:

Value := TextBetween(PageText, 'alt="Poster"', '/>');

and it gonna to work. They still change something.
herman
Posts: 15
Joined: 2017-12-25 11:02:29

Post by herman »

for 10 comments selection (commenttype = 1) just replace the section by this and add missing variables used in script:

if (GetOption('CommentType') = 1) then
begin
begin
Value2 := '';
Value3 := '';
p:= 0;
FullValue := ConvertToASCII(GetPage(MovieURL+'/reviews'));
FullValue := TextAfter(FullValue, '<div class="lister-item mode-detail imdb-user-review');
while FullValue <> '' do
begin
Value := TextBetween(FullValue, '<div class="review-container">','<div class="actions text-muted">');
p:= p + 1;
Value3 := inttostr(p) + '. ' + TextBetween(Value, '<div class="title">','</div>');
Value2 := Value2 + Value3;
Value2 := Value2 + ' (by ' + TextAfter (TextBetween(Value, '<span class="display-name-link">','</a>'),'>');
Value2 := Value2 + #32 + 'on ' + TextBetween(Value, '<span class="review-date">', '</span>') + ')' ;
Value := RemainingText;
Value := TextBetween(Value, '<div class="text">','</div>');
Value := StringReplace(Value, #13#10, ' ');
Value := StringReplace(Value, '<br/><br/>', #13#10);
Value := StringReplace(Value, '<br/>', #13#10);
HtmlRemoveTags(Value);
Value2 := Value2 + #13#10 + #13#10 + FullTrim(Value);
FullValue := TextAfter(FullValue, '<div class="lister-item mode-detail imdb-user-review');
if FullValue <> '' then Value2 := Value2 + #13#10 + #13#10;
end;
HTMLRemoveTags(Value2);
HTMLDecode(Value2);
SetField(fieldComments, Value2);
end;
end
antp
Site Admin
Posts: 9630
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

phil5660 wrote:I changeg the 33th line of the script to:
MaxActors = 15;

but nothing changes. Still download the 3 first actors for any movie...
In the script options on the right you have to double-click on "AllActors" and select 2 instead of 0 in the list.
Radagast
Posts: 15
Joined: 2016-04-22 16:07:15

Post by Radagast »

antp wrote:By the way, can you also send me the code of the page of the AKA titles, i.e. http://www.imdb.com/title/tt1686784/releaseinfo#akas ? As the problem is maybe rather from there.
Just sent the code.
Radagast
Posts: 15
Joined: 2016-04-22 16:07:15

Post by Radagast »

herman wrote:for poster to work just update one line in ImportLargePicture function:

Value := TextBetween(PageText, 'alt="Poster"', '/>');

and it gonna to work. They still change something.
It works for me herman, thanks.

Line to update in the script it's number 799
phil5660
Posts: 40
Joined: 2017-12-24 08:59:17

Post by phil5660 »

antp wrote:
In the script options on the right you have to double-click on "AllActors" and select 2 instead of 0 in the list.
Thank you, it works fine now !

Philippe.
Post Reply