View previous topic :: View next topic |
Author |
Message |
fr3n Voice
Joined: 02 Dec 2005 Posts: 16
|
Posted: Sun Apr 03, 2016 8:20 pm Post subject: |
|
|
sAnexeh wrote: | creasy wrote: | Thank you, that fixed it! For some reason I still had this code.. |
That's old code! . Maybe spithash can add some fixes in the imdb.tcl he is hosting, otherwise I'll update it and put it somewhere. |
That would be very much appreciated sAnexeh. Thank you. |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Mon Apr 04, 2016 4:01 pm Post subject: |
|
|
I just noticed the site hosted by spithash doesn't work. I didn't realize this, sorry! The domain bsdunix.info isn't registered anymore, so I doubt it will come back online anytime soon .
I've updated the script and put it online here: https://tcl.sanexeh.nl/imdb.tcl |
|
Back to top |
|
 |
creasy Voice
Joined: 05 Mar 2016 Posts: 23
|
Posted: Wed Apr 06, 2016 2:29 am Post subject: |
|
|
Thank you! |
|
Back to top |
|
 |
fr3n Voice
Joined: 02 Dec 2005 Posts: 16
|
Posted: Wed Apr 06, 2016 6:46 am Post subject: |
|
|
sAnexeh wrote: | I just noticed the site hosted by spithash doesn't work. I didn't realize this, sorry! The domain bsdunix.info isn't registered anymore, so I doubt it will come back online anytime soon .
I've updated the script and put it online here: https://tcl.sanexeh.nl/imdb.tcl |
Big thanks! Dank u!  |
|
Back to top |
|
 |
fr3n Voice
Joined: 02 Dec 2005 Posts: 16
|
Posted: Wed Apr 06, 2016 7:00 am Post subject: |
|
|
I'm using that tcl on an eggdrop which is installed on a OVH server, the titles are in French. How do i get it in English please?
!imdb the black knight
<@Mr_T> Le serment du chevalier noir (1954) http://imdb.com/title/tt0046786/
<@Mr_T> RATiNG: 5.2/10 (from 521 users) RUNTiME: 85
<@Mr_T> GENRE: Adventure |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Fri Apr 08, 2016 10:25 am Post subject: |
|
|
fr3n wrote: | I'm using that tcl on an eggdrop which is installed on a OVH server, the titles are in French. How do i get it in English please? |
According to IMDb this should work: Quote: | Please also remember that if you access the site through the following URL, you will always see films listed under their original titles regardless of your login status or site preferences: http://akas.imdb.com
|
This was changed in imdb.tcl in 2011 by znuff. Can you confirm you're using the following (latest) code: Code: | set imdburl "http://akas.imdb.com"
set imdbsearchurl "http://akas.imdb.com/find?s=tt&exact=false&" |
edit: if you are running the latest version, make sure you didn't forget to rehash/restart your eggdrop config, it should say "IMDB Info Version 25.03.2016: LOADED" when you rehash
If it still doens't work, can you perhaps enable debug (set IMDB_DEBUG 1 in imdb.tcl) and paste the output of logging when doing a lookup of a movie? |
|
Back to top |
|
 |
fr3n Voice
Joined: 02 Dec 2005 Posts: 16
|
Posted: Tue Apr 19, 2016 6:30 am Post subject: |
|
|
I grabbed your file and it says;
set imdburl "http://akas.imdb.com"
set imdbsearchurl "http://akas.imdb.com/find?s=tt&exact=false&"
When I rehash I see;
IMDB Info Version 25.03.2016: LOADED
Everything looks OK.
Debug gives me the following;
Code: |
[12:28:32] IMDB_DEBUG toput_result == PRIVMSG #fren
[12:28:32] IMDB_DEBUG searchString: "the%20black%20knight"
[12:28:32] IMDB_DEBUG http://akas.imdb.com/find?s=tt&exact=false&q=the%20black%20knight
[12:28:32] IMDB_DEBUG redirect 1
[12:28:32] IMDB_DEBUG no exact match - displaying first title on page
[12:28:32] IMDB_DEBUG redirect 1 = http://akas.imdb.com/title/tt0046786/
[12:28:34] IMDB_DEBUG title == Le serment du chevalier noir (1954)
[12:28:34] IMDB_DEBUG aka == Le serment du chevalier noir
[12:28:34] IMDB_DEBUG director == Tay Garnett
[12:28:34] IMDB_DEBUG writer == Alec Coppel (original screenplay), Dennis O'Keefe (additional dialogue) |1 more credit
[12:28:34] IMDB_DEBUG release date == 1 July 1955 (France)
[12:28:34] IMDB_DEBUG genre == Adventure
[12:28:34] IMDB_DEBUG tagline == New excitement ! New thrills ! Alan Ladd's biggest adventure !
[12:28:34] IMDB_DEBUG plot == As a blacksmith John can't hope to win the hand of Linet, daughter of the Earl of Yeonil. Off he goes to prove himself a noble knight. He makes himself a suit of armor with a winged chicken helmet and runs around fighting for King Arthur as the Black Knight. Evil doings include plots by visiting kings and a Druid sacrificial ceremony at Stonehenge.
[12:28:34] IMDB_DEBUG keywords == king || knight || king arthur || stonehenge || blacksmith || See All (43)
[12:28:34] IMDB_DEBUG awards == N/A
[12:28:34] IMDB_DEBUG comment == N/A
[12:28:34] IMDB_DEBUG rating == 5.2 | votes == 522 | rating bar == %color14[%color7*****%color7-----%color14]%color
[12:28:34] IMDB_DEBUG top250 == top/bottom:N/A
[12:28:34] IMDB_DEBUG mpaa == N/A
[12:28:34] IMDB_DEBUG runtime == 85
[12:28:34] IMDB_DEBUG country == UK
[12:28:34] IMDB_DEBUG language == English
[12:28:34] IMDB_DEBUG movie_color == Color(Technicolor)
[12:28:34] IMDB_DEBUG aspect_ratio == 1.37 : 1
[12:28:34] IMDB_DEBUG soundmix == Mono(Western Electric Recording)
[12:28:34] IMDB_DEBUG cert == N/A
[12:28:34] IMDB_DEBUG film_locations == Black Park, Iver Heath, Buckinghamshire, England, UK
[12:28:34] IMDB_DEBUG company == N/A
[12:28:34] IMDB_DEBUG cast_multiline == Cast overview, first billed only: Alan Ladd ... John Patricia Medina ... Linet André Morell ... Sir Ontzlake (as Andre Morell) Harry Andrews ... Earl Of Yeonil Peter Cushing ... Sir Palamides Anthony Bushell ... King Arthur Laurence Naismith ... Major Domo Patrick Troughton ... King Mark Bill Brandon ... Bernard Ronald Adam ... The Abbot Basil Appleby ... Sir Hal Thomas Moore ... The Apprentice Jean Lodge ... Queen Guenevere Pauline Jameson ... Lady Yeoni
[12:28:34] IMDB_DEBUG cast_line == Cast overview, first billed only: Alan Ladd ... John Patricia Medina ... Linet André Morell ... Sir Ontzlake (as Andre Morell) Harry Andrews ... Earl Of Yeonil Peter Cushing ... Sir Palamides Anthony Bushell ... King Arthur Laurence Naismith ... Major Domo Patrick Troughton ... King Mark Bill Brandon ... Bernard Ronald Adam ... The Abbot Basil Appleby ... Sir Hal Thomas Moore ... The Apprentice Jean Lodge ... Queen Guenevere Pauline Jameson ... Lady Yeonil Joh
[12:28:34] IMDB_DEBUG budget == N/A
[12:28:34] IMDB_DEBUG screens == N/A
|
I think IMDB uses geolocation;
Quote: | Default Title Display: For users that are not logged into www.imdb.com, and as the default for our registered users who have not selected a preference - we will display the localized version of the title they are looking for based on their geo-location. Users in France will see the title as released in France. |
http://www.imdb.com/help/show_leaf?sitepreferences |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Sun Jun 19, 2016 2:05 pm Post subject: |
|
|
fr3n wrote: | [12:28:34] IMDB_DEBUG title == Le serment du chevalier noir (1954)
[12:28:34] IMDB_DEBUG release date == 1 July 1955 (France)
I think IMDB uses geolocation; |
I think you are right. No idea why akas.imdb.com does this as they clearly state it should output in English only. I guess they changed their mind or they simply forgot.
I was able to fix this issue by using X-FORWARDED-FOR in the request headers to akas.imdb.com. I've also fixed some other small (performance) issues and changed the default announce setting to what I'm using because I cba to change it to default every time I need to fix something
For you the new setting "Language_IP" is relevant in imdb.tcl. I hope I made it easy enough for you
I've updated the script and put it online here: https://tcl.sanexeh.nl/imdb.tcl |
|
Back to top |
|
 |
Taken Voice
Joined: 26 Jul 2010 Posts: 7
|
Posted: Thu Aug 11, 2016 5:05 am Post subject: |
|
|
Hello,
Is it possible to fix awards? It shows "N/A" (and only in log debug) for films that have them.
Thanks! |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Thu Aug 11, 2016 4:38 pm Post subject: |
|
|
Taken wrote: | Hello,
Is it possible to fix awards? It shows "N/A" (and only in log debug) for films that have them.
Thanks! | I hope so! All I could find for awards without doing an additional lookup is something like "Nominated for 2 Oscars. Another 1 win & 4 nominations". I hope that's what you were looking for.
I've updated the script and put it online here: https://tcl.sanexeh.nl/imdb.tcl
Give it a try and let me know if it works out. |
|
Back to top |
|
 |
Taken Voice
Joined: 26 Jul 2010 Posts: 7
|
Posted: Fri Aug 12, 2016 11:38 am Post subject: |
|
|
Yes, it's enough!
Now... two little format fix for $mcolor :
Color|BlackandWhite to Color | Black and White
And $plot (with more than 700 chars) which cuts lines without \n really.
Thanks! |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Sat Aug 13, 2016 3:08 pm Post subject: |
|
|
Taken wrote: | Now... two little format fix for $mcolor :
Color|BlackandWhite to Color | Black and White
| I've updated the script. %mcolor should be fixed now. If it isn't, could you give me the name of the movie you're experiencing trouble with?
Taken wrote: | And $plot (with more than 700 chars) which cuts lines without \n really. | I don't know what you mean by this. Could you elaborate on this? What movie, what happens, etc?
On a general note, I also fixed %country, %language and %soundmix (applied trim), %wcredits, %keywords, %country, and %language (removed extra spaces) and %company (which was broken in general)
I've updated the script and put it online here: https://tcl.sanexeh.nl/imdb.tcl |
|
Back to top |
|
 |
Xplor3r Voice
Joined: 02 Sep 2016 Posts: 1
|
Posted: Fri Sep 02, 2016 2:18 pm Post subject: |
|
|
I got the latest code, but when using imdb command on channel still shows 2011 version. why? |
|
Back to top |
|
 |
sAnexeh Voice
Joined: 05 Dec 2013 Posts: 17
|
Posted: Tue Sep 06, 2016 1:05 pm Post subject: |
|
|
Xplor3r wrote: | I got the latest code, but when using imdb command on channel still shows 2011 version. why? |
Are you sure you loaded the correct script? Is it correctly configured in eggdrop.conf? When you telnet to the eggdrop and type .rehash after logging in you should see a message like "[19:03] IMDB Info Version 13.08.2016: LOADED" |
|
Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Thu Sep 08, 2016 1:25 pm Post subject: |
|
|
Another script for does interested is:
Code: |
# +-------------------------------------------------------------------------------------+
# | |
# | iMDB v1.0.0 |
# | |
# +-------------------------------------------------------------------------------------+
# | |
# | *** Website @ http://www.EggdropTCL.com |
# | *** GitHub @ http://github.com/MadaliNTCL/eggdrop-tcl |
# | |
# +-------------------------------------------------------------------------------------+
# | *** IRC Support: |
# | #EggdropTCL @ QuakeNET |
# | #EggdropTCL @ UnderNET |
# | #EggdropTCL @ EfNET |
# | |
# | *** Contact: |
# | Yahoo Messenger/Mail: madalinmen28@yahoo.com |
# | Google Mail : madalinmen28@gmail.com |
# | Skype Messenger : madalinmen28 |
# | |
# +-------------------------------------------------------------------------------------+
# + *** Commands *** |
# | +---------------+ |
# | [ OP - PUBLIC ] |
# | +---------------+ |
# | |
# | +++ !imdb <on/off> |
# +-------------------------------------------------------------------------------------+
bind PUBM - * imdb
bind PUBM - * imdb:pubm
package require json
package require http
package require tdom
setudef flag imdb
proc imdb:pubm {nick uhost hand chan arg} {
global temp
if {[string index $arg 0] in {! . `}} {
set temp(cmd) [string range $arg 1 end]
set temp(cmd) [lindex [split $temp(cmd)] 0]
set arg [join [lrange [split $arg] 1 end]]
} elseif {[isbotnick [lindex [split $arg] 0]]} {
set temp(cmd) [lindex [split $arg] 1]
set arg [join [lrange [split $arg] 2 end]]
} else { return 0 }
if {[info commands imdb:$temp(cmd)] ne ""} { imdb:$temp(cmd) $nick $uhost $hand $chan $arg }
}
proc imdb:imdb {nick uhost hand chan arg} {
global imdb iignore
switch -exact -- [lindex [split $arg] 0] {
on {
if {[isop $nick $chan]} {
channel set $chan +imdb
putserv "PRIVMSG $chan :\002$nick\002 - \00302Set channel mode \00306+imdb\0032 on \00304$chan"
}
}
off {
if {[isop $nick $chan]} {
channel set $chan -imdb
putserv "PRIVMSG $chan :\002$nick\002 - \00302Set channel mode \00306-imdb\0032 on \00304$chan"
}
}
}
}
proc imdb {nick uhost hand chan arg} {
global imdb iignore
if {![channel get $chan imdb]} { return }
## ++
set floodtime 10
## ++
if {![info exists iignore($nick)]} {
set iignore($nick) [unixtime]
utimer $floodtime [list unset -nocomplain iignore($nick)]
}
## ++
if {[expr [unixtime]-$iignore($nick)]>$floodtime} { putlog "ignoram"; return 0 }
regexp -all -nocase {(tt[0-9]{7})} $arg match imdbid
if {[catch {http::geturl http://www.omdbapi.com/?[http::formatQuery i $imdbid]} tok]} {
putlog "Socket error: $tok"
return 0
}
if {[http::status $tok] ne "ok"} {
set status [http::status $tok]
putlog "TCP error: $status"
return 0
}
if {[http::ncode $tok] != 200} {
set code [http::code $tok]
http::cleanup $tok
putlog "HTTP Error: $code"
return 0
}
set data [http::data $tok]
set parse [::json::json2dict $data]
set year [dict get $parse Year]
set title [dict get $parse Title]
set runtime [dict get $parse Runtime]
set genre [dict get $parse Genre]
set rating [dict get $parse imdbRating]
set votes [dict get $parse imdbVotes]
set plot [dict get $parse Plot]
set awards [dict get $parse Awards]
putserv "PRIVMSG $chan :\0031,8\002iMDB\002\003 - \00312$title\003 \037\[\037$runtime ($year)\037\]\037 \037\002/\002\037 \00306$genre\003 \037\002/\002\037 \002$rating\002 (\00302Votes\003: \00304$votes\003) \037\002/\002\037 Plot: \00310$plot\003 \037\002/\002\037 \00302Awards\003: \00304$awards"
}
putlog "++ \[ - \00304PUBLIC\003 - \00306loaded\003 * \00303iMDB\003 \]"
|
is triggered when imdb links are posted in the channel _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
Back to top |
|
 |
|