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
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

Add

Code: Select all

variable imdb
after

Code: Select all

global cast_linelimit instance delay imdb_timeout ...
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

Thank you man, it's working great now :)
I might use that flood protection on my script as well if that is okay with you :)

By the way, I added you to the credits of the script. If anyone's interested to get this version, this is it:

http://phobos.bsdunix.info/imdb.tcl
Last edited by spithash on Sun Sep 02, 2012 2:16 am, edited 2 times in total.
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

Great!
And look at this. You can replace

Code: Select all

    if { $permission_result == 0} { return }
With the

Code: Select all

    if {![channel get $chan imdb]} { return }
After that delete

Code: Select all

proc channel_check_imdb { chan } {
    foreach setting [channel info $chan] {
        if {[regexp -- {^[\+-]} $setting]} {
            if {![string compare "+imdb" $setting]} {
                set permission 1
                break
            } else {
                set permission 0
            }
        }

    }
    return $permission
}
and

Code: Select all

    set permission_result [channel_check_imdb $chan]
And can you replace this

Code: Select all

    set output [replacevar $output "%title" $title]
    set output [replacevar $output "%aka" $aka]
    set output [replacevar $output "%url" $cleanurl]
With something like that

Code: Select all

    set output [string map "%title" "$title" "%aka" "$aka" "%url" "$cleanurl" $output]
?
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

set output [string map [list "%title" "$title" "%aka" "$aka" "%url" "$cleanurl"] $output]
He can also replace:

Code: Select all

    set output [replacevar $output "%title" $title]
    set output [replacevar $output "%aka" $aka]
    set output [replacevar $output "%url" $cleanurl]
    set output [replacevar $output "%name" $name]
    set output [replacevar $output "%genre" $genre]
    set output [replacevar $output "%tagline" $tagline]
    set output [replacevar $output "%plot" $plot]
    set output [replacevar $output "%keywords" $keywords]
    set output [replacevar $output "%awards" $awards]
    set output [replacevar $output "%comment" $comment]
    set output [replacevar $output "%rating" $rating]
    set output [replacevar $output "%rbar" $rating_bar]
    set output [replacevar $output "%votes" $votes]
    set output [replacevar $output "%top250" $top250]
    set output [replacevar $output "%mpaa" $mpaa]
    set output [replacevar $output "%time" $runtime]
    set output [replacevar $output "%country" $country]
    set output [replacevar $output "%language" $language]
    set output [replacevar $output "%mcolor" $movie_color]
    set output [replacevar $output "%aspect" $aspect_ratio]
    set output [replacevar $output "%soundmix" $soundmix]
    set output [replacevar $output "%cert" $cert]
    set output [replacevar $output "%locations" $film_locations]
    set output [replacevar $output "%company" $company]
    set output [replacevar $output "%budget" $budget]
    set output [replacevar $output "%screens" $screens]
    set output [replacevar $output "%reldate" $reldate]
with a single long line like this:

Code: Select all

set output [string map [list "%title" "$title" "%aka" "$aka" "%url" "$cleanurl" "%name" "$name" "%genre" "$genre" "%tagline" "$tagline" "%plot" "$plot" "%keywords" "$keywords" "%awards" "$awards" "%comment" "$comment" "%rating" "$rating" "%rbar" "$rating_bar" "%votes" "$votes" "%top250" "$top250" "%mpaa" "$mpaa""%time" "$runtime" "%country" "$country" "%language" "$language" "%mcolor" "$movie_color" "%aspect" "$aspect_ratio" "%soundmix" "$soundmix" "%cert" "$cert" "%locations" "$film_locations" "%company" "$company" "%budget" "$budget" "%screens" "$screens" "%reldate" "$reldate"] $output]
Once the game is over, the king and the pawn go back in the same box.
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

I mean it but show only small part of code.
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

Great! Thanks guys :)

The script is updated:

http://phobos.bsdunix.info/imdb.tcl
Last edited by spithash on Sun Sep 02, 2012 2:17 am, edited 2 times in total.
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 »

the script is not working for me.

when i execute the search, there is no reply from my bot, and doesn't say anything in party line

any help?
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

I'm not sure what the problem might be. A bunch of friends are using this script and it's working great for each one of them, even recently (a day ago) a new eggdrop we've setup, is working great with it. Are you sure you have http.tcl loaded before the 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 »

yep 100% for sure

i don't know why it's not working either

<goalie> !imdb 21 jump street
<secksy> Error retrieving URL... try again later.
x
x0x
Op
Posts: 140
Joined: Tue Feb 10, 2009 6:42 am

Post by x0x »

The script works fine with Eggdrop 1.8, it is a bit slow however! It takes approx. 9 to 10 seconds before a reply arrives with the results.

Now I know it needs to scrape imdb.com once or twice and I already changed the script to use "putquick".

I'm not a developer but maybe it's a good idea to use the IMDb api?

http://app.imdb.com/find?q=Ghostbusters
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

For those who asked me what happened to my server where I host some of the scripts we maintain here in this forum, I was under attack and unfortunately it was down for a few days, had to nullroute it to avoid problems. Anyway, it's up again. The link(s) are working again. as for the host/box bsdunix.info it will be up soon too. for now, I'll be using some other servers such as phobos.bsdunix.info and cronus.bsdunix.info.

Thank you for your patience.
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
l
l1ve
Voice
Posts: 7
Joined: Tue Oct 30, 2007 3:18 pm

Post by l1ve »

How can i get usascreens and ukscreens with this script?

Like this api does http://www.deanclatworthy.com/imdb/
User avatar
bunnybump
Voice
Posts: 9
Joined: Fri Aug 17, 2012 2:32 am
Contact:

Post by bunnybump »

it doesn't works for me anymore. it's showing like below:

Code: Select all

Error in search mechanics - you probably need a newer version.
is there any new version of this tcl type?
In the Beginning... Was the Command Line
g
goalie204
Halfop
Posts: 44
Joined: Thu Apr 28, 2011 7:31 pm

Post by goalie204 »

any chance of an update good sir?
t
tusinamuna
Voice
Posts: 4
Joined: Fri Dec 07, 2012 1:04 pm

Post by tusinamuna »

Yep, Waiting for an update <3
Post Reply