| View previous topic :: View next topic |
| Author |
Message |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Thu Mar 15, 2012 12:28 pm Post subject: |
|
|
Add
after
| Code: | | global cast_linelimit instance delay imdb_timeout ... |
_________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
spithash Master

Joined: 12 Jul 2007 Posts: 248 Location: Libera
|
Posted: Fri Mar 16, 2012 6:49 am Post subject: |
|
|
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 _________________ Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Last edited by spithash on Sun Sep 02, 2012 2:16 am; edited 2 times in total |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Fri Mar 16, 2012 9:32 am Post subject: |
|
|
Great!
And look at this. You can replace
| Code: | | if { $permission_result == 0} { return } |
With the
| Code: | | if {![channel get $chan imdb]} { return } |
After that delete
| Code: | 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: | | set permission_result [channel_check_imdb $chan] |
And can you replace this
| Code: | set output [replacevar $output "%title" $title]
set output [replacevar $output "%aka" $aka]
set output [replacevar $output "%url" $cleanurl] |
With something like that
| Code: | | set output [string map "%title" "$title" "%aka" "$aka" "%url" "$cleanurl" $output] | ? _________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Mar 16, 2012 12:22 pm Post subject: |
|
|
| Code: |
set output [string map [list "%title" "$title" "%aka" "$aka" "%url" "$cleanurl"] $output]
|
He can also replace:
| Code: |
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: |
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. |
|
| Back to top |
|
 |
username Op

Joined: 06 Oct 2005 Posts: 196 Location: Russian Federation, Podolsk
|
Posted: Sat Mar 17, 2012 5:11 am Post subject: |
|
|
I mean it but show only small part of code. _________________ Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/ |
|
| Back to top |
|
 |
spithash Master

Joined: 12 Jul 2007 Posts: 248 Location: Libera
|
Posted: Mon Mar 19, 2012 7:59 am Post subject: |
|
|
Great! Thanks guys
The script is updated:
http://phobos.bsdunix.info/imdb.tcl _________________ Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
Last edited by spithash on Sun Sep 02, 2012 2:17 am; edited 2 times in total |
|
| Back to top |
|
 |
goalie204 Halfop
Joined: 28 Apr 2011 Posts: 44
|
Posted: Wed May 16, 2012 7:40 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
spithash Master

Joined: 12 Jul 2007 Posts: 248 Location: Libera
|
Posted: Fri May 18, 2012 10:09 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
goalie204 Halfop
Joined: 28 Apr 2011 Posts: 44
|
Posted: Mon May 21, 2012 10:49 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
x0x Op
Joined: 10 Feb 2009 Posts: 140
|
Posted: Tue Jun 05, 2012 3:06 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
spithash Master

Joined: 12 Jul 2007 Posts: 248 Location: Libera
|
Posted: Wed Jun 06, 2012 9:48 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
l1ve Voice
Joined: 30 Oct 2007 Posts: 7
|
|
| Back to top |
|
 |
bunnybump Voice

Joined: 17 Aug 2012 Posts: 9
|
Posted: Wed Nov 28, 2012 12:03 pm Post subject: |
|
|
it doesn't works for me anymore. it's showing like below:
| Code: | | 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 |
|
| Back to top |
|
 |
goalie204 Halfop
Joined: 28 Apr 2011 Posts: 44
|
Posted: Mon Dec 03, 2012 8:46 pm Post subject: |
|
|
| any chance of an update good sir? |
|
| Back to top |
|
 |
tusinamuna Voice
Joined: 07 Dec 2012 Posts: 4
|
Posted: Fri Dec 07, 2012 1:06 pm Post subject: |
|
|
| Yep, Waiting for an update <3 |
|
| Back to top |
|
 |
|