This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

imdb-1.1.0.tcl help please

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

found a bug!

Post by rosc2112 »

Damn, I'm good, I found a bug 1st try! <grin>

Using the beta version, somehow the tagline and plot are bleeding together:

Code: Select all

<bot> 'Daria' (1997) - http://www.imdb.com/title/tt0118298/
<bot>   Tagline : Talks Slow, Thinks Fast
<bot> Plot Outline: A smart & cynical girl goes through teenage life as an proud outsider in a world of mainly idiotic teens and condescending adults. 
<bot>   Genre   : Animation / Comedy  
<bot>   Awards  : N/A 
<bot>   Rating  : 7.8/10 (25 votes) 
<bot>   Director: Ray Kosarin, Anthony Davis,  (more) 
<bot>   Runtime : 22 mins.
<bot>   Country : USA / South Korea
<bot>   Language: English
<bot>   Budget  : N/A
<bot>   Plot    : A smart & cynical girl goes through teenage life as an proud outsider in a world of mainly idiotic teens and condescending adults.  

Debug:

[bot(dcc)] [22:07] IMDB_DEBUG tagline == Talks Slow, Thinks Fast
[bot(dcc)] Plot Outline: A smart & cynical girl goes through teenage life as an proud outsider in a world of mainly idiotic teens and condescending adults.

[bot(dcc)] [22:07] IMDB_DEBUG plot == A smart & cynical girl goes through teenage life as an proud outsider in a world of mainly idiotic teens and condescending adults.
Hmm..tried a few other titles, didn't have that problem.. Did it for Beavis and Butthead as well.. Damn awnry cartoons. Tried with 'King Kong' same prob.. Damn anwry giant monkeys..

Also note that in the director line, a html code is sneaking through:
<bot> Director: Ray Kosarin, Anthony Davis,  (more)
Should prolly chop the line at the (more)

And just a reminder request, to add the writers credits (I know, I'm a pain in the arse ;)

Thanks again OV2 :)
O
OV2
Voice
Posts: 35
Joined: Sat Jan 21, 2006 3:54 pm
Contact:

Post by OV2 »

I thought I was cutting in front of "(more)" ... damn regexp...
I'll take a look when I'm home (still 2 hours of *work work*).

And yes I'll eventually get around to the writers credits :D
O
OV2
Voice
Posts: 35
Joined: Sat Jan 21, 2006 3:54 pm
Contact:

Post by OV2 »

OK I've fixed all reported bugs (except the tcl-special-char-safeness 8) ) and the writers credits should also work. Redownload the beta rar file, it should be the new version.
And feedback is always appreciated.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

This version looks excellent so far, haven't found anything to break it yet.

Just 2 notes:
On the awards, its leaving an extraneous space on the lefthand side, so I added after the regsub's:

Code: Select all

set awards [string trimleft $awards]
And in mapfile I've added:

Code: Select all

& #161; ¡
(had to put a space there cos the html code was being translated)
I suppose eventually I'll come across titles with other funky ascii chars, and will add them as needed :)

Thanks again OV2 :)
O
OV2
Voice
Posts: 35
Joined: Sat Jan 21, 2006 3:54 pm
Contact:

Post by OV2 »

I added the trim line but used a normal trim, so that possible trailing spaces are also removed.

What do you mean with "html code was translated"? Isn't that the purpose of the mapfile? :)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

OV2 wrote: What do you mean with "html code was translated"? Isn't that the purpose of the mapfile? :)
Nono, I meant it was translated here on the board, even with the code tags.. Silly phpboards..

I found another thing to tweak: When searching for 'Martian Chronicles' and some other titles (south park for example), imdb has "rest of cast listed alphabetically:" in the cast lines, so the output shows as:

Code: Select all

<bot> Joyce Van Patten .... Elma Parkhill rest of cast listed alphabetically: Linda Lou Allen .... Marilyn
O
OV2
Voice
Posts: 35
Joined: Sat Jan 21, 2006 3:54 pm
Contact:

Post by OV2 »

Fixed that bug - I think it's only one changed line (simply redownload).
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Found another small prob, when my network is really screwy (blame epix :P)
sometimes I'll get this in the bot's log:

Tcl error [imdb_proc]: couldn't open socket: host is unreachable

Perhaps the script can catch that and return a msg to the user that it was unable to connect.

Tnx :)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Oh boy, found a new bug, cept I can't figure out quite how to fix it. When imdb goes directly to a movie's page, the script is returning an error about
"Tcl error [imdb_proc]: can't read "oldpage(meta)": no such variable:

This happens with the movie "invisible circus" for example.

Any ideas how to fix? =)

Tnx
O
OV2
Voice
Posts: 35
Joined: Sat Jan 21, 2006 3:54 pm
Contact:

Post by OV2 »

Invisible circus works find here... maybe it's got something to do with the new advertising pages that now sometimes pop up? I'll try to check that tomorrow.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Meh, I found the problem, it was because I changed ::http::Finish to ::http::cleanup.. I can't find any documentation for "http::Finish" and the docs I do have indicate that "http::cleanup" is what's sposed to be used to close the connection and stuff... Why this makes a diff, I dont know =)
S
Sir_Cedric_Lex2
Voice
Posts: 3
Joined: Mon Jul 03, 2006 8:30 am

Post by Sir_Cedric_Lex2 »

Hi OV2, script works fine...
nice to meet you here^^

great work!

cu
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

imdb cast format change

Post by rosc2112 »

Just noticed today IMDB changed the html a bit for the "Cast" listings, I made the following change in my copy of the script:

Code: Select all

replaced:
#regsub -all {</tr><tr>} $cast \n cast_multiline

with:

regsub -all {</td></tr><tr bgcolor=\"#.*?\">} $cast \n cast_multiline
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

There's a bug displaying infos about the movie "cars" :
<Boole> Cars (2006) - http://www.imdb.com/title/tt0317219/
<Boole> réalisateur : John Lasseter, Joe Ranft (co-director),
<Boole> ,
<Boole> Writing credits
<Boole> John Lasseter (story) &, Joe Ranft (story) ...

<Boole> genre : Animation / Comedy / Family / Fantasy / Sport
<Boole> une pensée sur ce film : Ahhh... it's got that new movie smell.
<Boole> synopsis : Cars Is the saga of Lightning McQueen, a hot-shot animated stock-car voiced by actor Owen Wilson. In route to a big race, the cocky McQueen gets waylaid in Radiator Springs, where he finds the true meaning of friendship and family.
<Boole> classement : 7.7/10 (9,517 votes) [••••••••--]
<Boole> récompenses : 2 nominations
<Boole> durée : 116mn.
<Boole> casting : Owen Wilson .... Lightning McQueen (voice)
<Boole> Paul Newman .... Doc Hudson (voice)
<Boole> Bonnie Hunt .... Sally Carrera (voice)
<Boole> Larry The Cable Guy .... Mater (voice)
<Boole> Cheech Marin .... Ramone (voice)
The announce is displayed by :

Code: Select all

set announce(IMDBIRC) "%bold%title%bold - %color12%uline%url%uline%color\n%ulineréalisateur :%uline %color14%name%color\n%ulinegenre :%uline %color14%genre%color\n%ulineune pensée sur ce film :%uline %color14%tagline%color\n%ulinesynopsis :%uline %color14%plot%color\n%ulineclassement :%uline %color14%rating (%votes votes) %rbar %color\n%ulinerécompenses :%uline %color14%awards%color\n%ulinedurée :%uline %color14%timemn.%color\n%ulinecasting :%uline %color14%castmline"


Also, how to find infos for movies like "E.T." or "Les dessous de Clara Morgane" ? Typing the exact right name can be difficult... Would it be possible to take automatically the first of the several suggested matches in case several movie names fit ?


In case the bot can't find infos about a given search argument, he says : <Boole> No no no! I can't find that! and it increases the flood control count. Shouldn't unsuccessful searches be excluded from the flood control ?


When searching for a movie, In case the result points towards an actor instead of a movie, all fields are filled by N/A. Could you add a specific error message to handle this ?
Example with !imdb Clara Morgane :
<Boole> N/A - http://www.imdb.com/
<Boole> réalisateur : N/A
<Boole> genre : N/A
<Boole> une pensée sur ce film : N/A
<Boole> synopsis : N/A
<Boole> classement : N/A (N/A votes)
<Boole> récompenses : N/A
<Boole> durée : N/Amn.
<Boole> casting : N/A

Keep up the good work :wink:
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

1) The problem with the commas in the director output, I fixed by using:

Code: Select all

        set name [string map {<br> "\ "} $name]
instead of
        set name [string map {<br> ", "} $name]
2) Searching for "ET the extraterrestrial" works.

3) The script does already take the 1st match when there are multiple possible matches.

4) Dessous de Clara Morgane doesn't work because the only listing IMDB does have for it, is under "Actress Filmography" which is not a string that the script looks for. Prolly easy enough to add in, although not something I feel compelled to do myself.

5) Unsuccessful matches *should* increase the flood control count, in case some idiot decides to flood the bot with garbage. And since this is a configurable option, you can disable it if you want.


6) I use this at the end of the script, at the end of "output results"

Code: Select all

last line of output -> set output [replacevar $output "%wcredits" $wcredits]
        foreach line [split $output "\n"] {
                if {[regexp N/A $line]} {
                        continue
                } else {
                        puthelp "$toput :$line"
                }
        }
Post Reply