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
g
goalie204
Halfop
Posts: 44
Joined: Thu Apr 28, 2011 7:31 pm

Post by goalie204 »

plz :)
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

maybe username cares to fix this script, I don't know yet.. I've sent him a private message to maintain it, or let me know how he fixed the other perplexa's imdb script so I can understand what he changed so I can fix it, I seem to be pointing to the wrong lines/issues :(

Unfortunately I am not a coder but I am just trying to understand bits and parts of it and sometimes I succeed, that is all.

let us see :)

I love this script.

anyway, it is still available and still not working here: http://phobos.bsdunix.info/imdb.tcl
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
H
Hellster
Voice
Posts: 22
Joined: Thu Aug 10, 2006 7:35 pm

Post by Hellster »

I looked over the script many times, i've managed to edit TCL scripts before, but i have no idea with this one, would be awesome if someone could update it tho :)
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I bet ist's not working properly or at all mainly due to the simple fact that they (IMDB) may have changed the layout and thus killed the script.

I don't get it why isn't anyone doing something with this 3rd party IMDB API. It's a lot easier to fetch results from it.

Edit: Apparently isn't THAT good as I hoped, meaning that you can't search for instance "Batman" and see all results with that title, will just point you to the last one. :roll:
Once the game is over, the king and the pawn go back in the same box.
r
romprod
Halfop
Posts: 49
Joined: Fri Oct 19, 2001 8:00 pm

Post by romprod »

Has anyone been able to fix this yet?
g
gr11x
Voice
Posts: 3
Joined: Wed Feb 28, 2007 5:38 pm

Post by gr11x »

The IMDb seems to have changed just the search request and the title of the search page so it's quite easy to fix:

Search for

Code: Select all

set imdbsearchurl "http://akas.imdb.com/find?tt=on;nm=on;mx=5;"
and change to

Code: Select all

set imdbsearchurl "http://akas.imdb.com/find?s=tt&exact=true&"
Then search for

Code: Select all

if { ([regexp {<title>IMDb.*Search} $html] == 1) } {
and change to

Code: Select all

if { ([regexp {<title>Find - IMDb} $html] == 1) } {
Based on the last mentioned version (posted here), I put the changes on pastebin.
r
romprod
Halfop
Posts: 49
Joined: Fri Oct 19, 2001 8:00 pm

Post by romprod »

That works great, thanks!
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

you also need to comment out these lines:

Code: Select all

    # channel_check permission
    if {$IMDB_DEBUG == 1} { putlog "IMDB_DEBUG permission_result == $permission_result" }
    if {$IMDB_DEBUG == 1} { putlog "IMDB_DEBUG instance == $instance" }
    if {![channel get $chan imdb]} { return }
I mean make it look like this:

Code: Select all

    # channel_check permission
#    if {$IMDB_DEBUG == 1} { putlog "IMDB_DEBUG permission_result == $permission_result" }
#    if {$IMDB_DEBUG == 1} { putlog "IMDB_DEBUG instance == $instance" }
#    if {![channel get $chan imdb]} { return }
The script is updated in this url: http://phobos.bsdunix.info/imdb.tcl
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
g
goalie204
Halfop
Posts: 44
Joined: Thu Apr 28, 2011 7:31 pm

Post by goalie204 »

woot! thx bro!
g
gr11x
Voice
Posts: 3
Joined: Wed Feb 28, 2007 5:38 pm

Post by gr11x »

If you feel that you don't get sufficient results e.g. for vague searches like "starship troopers 2012" you can disable exact title matching in the search url:

Instead of

Code: Select all

set imdbsearchurl "http://akas.imdb.com/find?s=tt&exact=true&"
just use

Code: Select all

set imdbsearchurl "http://akas.imdb.com/find?s=tt&exact=false&"
x
x0x
Op
Posts: 140
Joined: Tue Feb 10, 2009 6:42 am

Post by x0x »

IMDb changed it's HTML code again.
Last edited by x0x on Fri Feb 08, 2013 7:19 pm, edited 2 times in total.
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

Thank you, I updated the script with your edit gr11x :)
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
s
sAnexeh
Voice
Posts: 17
Joined: Thu Dec 05, 2013 6:36 am

Post by sAnexeh »

Hi,

imdb added some ads on their search page which in my case caused wrong search results. I've changed the following code to fix it:

Code: Select all

#searching for first ttcode
if [regexp {/title/tt[0-9]+} $temp ttcode] {

Code: Select all

#searching for first ttcode
if [regexp {\=\"/title/tt[0-9]+} $temp ttcode] {
Hope this helps someone.
j
janari
Voice
Posts: 4
Joined: Thu Dec 12, 2013 8:56 am

Post by janari »

Yes, it really does help me, thank you.
n
name
Voice
Posts: 3
Joined: Mon Apr 21, 2014 6:43 pm

Post by name »

Hi ppl, thanks for updating this script, i have a issue, hope somebody can help me.

I've made some changes on annouce format, but %genre not showing in the same line (it's supposed to do), dunno why, it's a script bug, or am i doing something wrong? Please help me :)

Annouce format:

Code: Select all

# set default announce format
set announce(IMDBIRC) "%bold%title%bold %url\n|%boldRATiNG:%bold %rating/10 (from %votes users) %boldRUNTiME:%bold %time\n|%boldGENRE:%bold %genre"
Output:

Code: Select all

<bot> Limitless (2011) http://imdb.com/title/tt1219289/
<bot> RATiNG: 7.4/10 (from 294,562 users) RUNTiME: 105min
<bot> GENRE: Mystery |
<bot>  Sci-Fi |
<bot>  Thriller
How it should be:

Code: Select all

<bot> Limitless (2011) http://imdb.com/title/tt1219289/
<bot> RATiNG: 7.4/10 (from 294,562 users) RUNTiME: 105min
<bot> GENRE: Mystery | Sci-Fi | Thriller

Code: Select all

http://pastebin.com/gfTjjADc
Post Reply