Page 1 of 1

[REQ] Problems with IMDB 3.80

Posted: 2013-10-18 17:04:34
by chalket
Hi,
I've been using AMC for several years now, but this is my first posting in the forum. The IMDB script is the only one I use, it has had a variety of quirks over the years but overall I have been very pleased. Thanks!

My current problem is that the script seems to be accessing IMDB's "Combined" page instead of the "Main" page that it used to use. Because of that (I assume), it no longer finds a "Description" for the movie, quite a major flaw! (I can't believe I am the only one finding this?) It does still import the tag-line into the Description field, but it no longer imports any kind of Description (or the Awards anymore, either). No description makes the program pretty much useless to me.

On a side note, it has been several updates since the "Comments" import has worked properly. If I use CommentType=0 (Standard, Only one comment from main page) it works, but the CommentType=1 (Detailed, 10 most useful comments) that I used to use (the one I prefer) hasn't worked since July 2011.

I have many new movies to catalog, so I really hope this can be addressed soon. Thanks!

*EDIT*
Am I really the only one having this problem? Or am I the only one using the IMDB script?? Either way, I really need some help with this... does anyone know how I could contact any of the writers of the script?

Posted: 2013-10-24 22:02:48
by cage
The IMDB script will continually break; there is no way around this. You'll need to modify the IMDB.ifs file if nobody is there to do it for you.

Comment out line 390

Code: Select all

Value := StringReplace(Value, '<div class="info-content">', '');
and replace it with the following:

Code: Select all

Value := TextBetween(Value, '<div class="info-content">', '<a class="tn15more inline"');
This is just a quick and dirty hack to get the descriptions working again. Do not be surprised if IMDB makes changes that break this.

Posted: 2013-10-25 10:30:24
by antp
With which movie have you tested this? It does not seem to change anything :??:

Posted: 2013-10-25 16:09:53
by chalket
To antp: I tried the suggested change and it seems to work for me. (I tested it on "Leaving Las Vegas" and it did grab the description.)

To cage: Thanks very much for your help, I have absolutely zero programming knowledge so I would *never* have gotten there on my own! My troubles with this script are far from solved, but at least you have returned the basic functionality for me. Thanks again!

To all: I don't want to sound ungrateful, but how hard would it be to return the "Award" function (import to description field)?

Posted: 2013-10-25 17:40:24
by cage
I noticed I had some issues scraping descriptions that were long ie. had a link to 'see full summary'

The original changes worked well when scraping descriptions with short descriptions that didn't flow into the 'full summary' page.

The following will grab the full description; you can disregard the previous changes...

comment out 894

Code: Select all

Value := TextBefore(Value, '<i>', '');
comment out 890

Code: Select all

Value := TextBetween(PageText, '<p class="plotpar">', '</p>');
replace with

Code: Select all

Value := TextBetween(PageText, '<p class="plotSummary">', '</p>');
comment out 904

Code: Select all

Value := TextBetween(PageText, '<p class="plotpar">', '</p>');
replace with

Code: Select all

Value := TextBetween(PageText, '<p class="plotSummary">', '</p>');

Sample long description : http://www.imdb.com/title/tt0097550/
Sample short description: http://www.imdb.com/title/tt0087759/

This is working fine for me.

EDIT
Fixed up the multi comments bug
Fixed awards scraping

I don't use either of those 2 options. This script needs a major rewrite as it's a total mess.

I'm just keeping my updates here:

http://bit.ly/NhjwGf

Posted: 2013-10-26 05:28:52
by chalket
All I can say is "Wow! Good job!":grinking: It was impressive enough getting the description fixed, but now you've got the multi-comment import working again for the first time in more than 2 years? Dude, you're awesome!

Now, if you could just get the Award import working again, you would be a god! ;)

Posted: 2013-10-26 11:16:20
by antp
Thanks for the full file, I'll put that one as official version 3.81 then

Posted: 2013-10-29 14:40:17
by chalket
Now, if you could just get the Award import working again, you would be a god! wink
Come on, cage, don't quit now! You have this script soooo close to perfect again! Why not fix the Award import function and finish the job in style? Then it could *really* be the "official version 3.81" with your name credited! :clapping:

Posted: 2013-10-29 14:57:27
by antp
Well his version is already 3.81 with his name credited :??:
Next fix would become 3.82 then

Posted: 2013-10-29 16:04:43
by chalket
Aw, come on, antp! You're not helping me cajole him (or her?) into finishing the job! :hum:

Posted: 2013-12-18 21:47:17
by cage
This script was updated to 3.82 awhile back. Looks like http://update.antp.be/amc/scripts/ is still on 3.81.

Posted: 2013-12-19 12:58:59
by antp
Thanks. I'll update it.