I realize that there are several other similar scripts, however this script is part of a larger project, so I decided to add a few lines to my current progress and make a little trigger script.
First of all, this script is designed to ONLY search for Movies. This script will NOT search for TV shows. I used a google search engine instead of the imdb one, to make sure that all the results are Movie related. The google search engine also allows for a higher tolerance for spelling errors.
;!IMDB Movie Search Script by Ford_Lawnmower irc.Geekshed.net #Script-Help
alias -l IMDB {
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Start Setup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Change %tagcolor to the color you want for tags:
var %tagcolor $+($chr(15),$chr(2))
;;;; Change %textcolor to the color you want for normal text
var %textcolor $+($chr(15),$chr(3),04)
;;;; Change %linkcolor to the color/format you want for links
var %linkcolor $+($chr(15),$chr(31))
;;;; Change %ratingcolor+ to the color you want for the positive stars in the rating.
var %ratingcolor+ $+($chr(15),$chr(3),04)
;;;; Change %ratingcolor- to the color you want for the negative stars in the rating.
var %ratingcolor- $+($chr(15),$chr(3),14)
;;;; You can change the way this script prints out by editing
;;;; %lineone, %linetwo and %linethree below.
;;;; tags must be valid and separated by a space.
;;;; valid tags are as follows: title rating votes genres
;;;; runtime director writer language country date plot
;;;; shortplot cast link trailer reviews critics
;;;; If you want to omit a line, just change it to 0
;;;; Use title instead of otitle if you want the title in the language related to your ip address
var %lineone otitle rating votes reviews critics genres runtime director writer language country date
var %linetwo shortplot
var %linethree cast link trailer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End Setup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
var %sockname $+(IMDB,$network,$2,$ticks)
hadd -m %sockname lineone %lineone
hadd %sockname linetwo %linetwo
hadd %sockname linethree %linethree
sockopen %sockname www.imdb.com 80
sockmark %sockname $1-2 $+(/title/,$3,/) 0 %tagcolor %textcolor %linkcolor 0 0 %ratingcolor+ %ratingcolor-
}
menu Channel,Status {
.$iif($group(#IMDB) == On,$style(1)) IMDB IMDB Trigger
..$iif($group(#IMDB) == On,$style(2)) On: .enable #IMDB
..$iif($group(#IMDB) == Off,$style(2)) Off: .disable #IMDB
}
#IMDB on
On $*:Text:/^(\+|-|!|@)IMDB.*/Si:#: {
var %action $regml(1)
if (%action isin +-) && ($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/)) {
if (%action == +) {
if ($istok(%IMDBChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is already running the IMDB script }
else {
.enable #IMDB
Set %IMDBChanList $addtok(%IMDBChanList,$+($network,$chan),32)
.msg $chan $nick has activated the IMDB script for $chan .
}
}
else {
if (!$istok(%IMDBChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is not running the IMDB script }
else {
Set %IMDBChanList $remtok(%IMDBChanList,$+($network,$chan),1,32)
.msg $chan $nick has deactivated the IMDB script for $chan .
}
}
}
elseif (!$timer($+(IMDB,$network,$nick))) && ($istok(%IMDBChanList,$+($network,$chan),32)) {
.timer $+ $+(IMDB,$network,$nick) 1 6 noop
var %method $iif(%action == !,.notice $nick,$iif($regex($nick($chan,$nick).pnick,/(!|~|&|@|%|\+)/),.msg $chan,.notice $nick))
GIMDB %method $2-
}
}
alias EIMDB { GIMDB echo -a $1- }
alias -l GIMDB {
$1-2 Searching For: $3- .............
var %sockname $+(GIMDB,$network,$2,$ticks)
sockopen %sockname www.google.com 80
sockmark %sockname $1-2 $+(/search?q=,$replace($3-,$chr(32),+),+site:imdb.com&rls=en&hl=en) $3-
}
On *:sockopen:GIMDB*: {
if (!$sockerr) {
sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.0
sockwrite -n $sockname Host: $sock($sockname).addr
sockwrite -n $sockname User-Agent: Opera 9.6
sockwrite -n $sockname $crlf
}
else { echo -st Socket Error $nopath($script) | hfree $sockname | sockclose $sockname }
}
On *:sockread:GIMDB*: {
if ($sockerr) { echo -st Socket Error $nopath($script) | hfree $sockname | sockclose $sockname }
else {
sockread &GIMDB
if ($bintween(&GIMDB,Location:,ttp,1)) {
noop $regex($bvar(&GIMDB,1-).text,/http\:\/\/([^\.]*\.google\.[^\/]*)(.*)/i)
var %sockname $+(GIMDB,$network,$2,$ticks)
sockopen %sockname $regml(1) 80
sockmark %sockname $gettok($sock($sockname).mark,1-2,32) $regml(2) $gettok($sock($sockname).mark,3-,32)
sockclose $sockname
return
}
elseif ($bintween(&GIMDB,<cite>www.imdb.com/title/,/</cite>,1)) {
IMDB $gettok($sock($sockname).mark,1-2,32) $v1
sockclose $sockname
return
}
elseif ($bintween(&GIMDB,Your search,</b> - did not match any documents.,1)) {
$gettok($sock($sockname).mark,1-2,32) Sorry - Cannot find $gettok($sock($sockname).mark,4-,32)
sockclose $sockname
return
}
}
}
On *:sockclose:GIMDB*: { $gettok($sock($sockname).mark,1-2,32) Sorry - Cannot find $gettok($sock($sockname).mark,4-,32) }
On *:sockopen:IMDB*: {
if (!$sockerr) {
sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.0
sockwrite -n $sockname Host: www.imdb.com
sockwrite -n $sockname User-Agent: Opera 9.6
sockwrite -n $sockname $crlf
}
else { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
}
On *:sockclose:IMDB*: hfree $sockname
On *:sockread:IMDB*: {
if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
else {
var %IMDb | sockread %IMDb
if ($regex(%imdb,/<title>(.*?)<\/title>/i)) hadd -m $sockname title $+($gettok($sock($sockname).mark,5,32),Title:,$chr(32),$gettok($sock($sockname).mark,6,32)) $Xchr($remove($regml(1),IMDb -))
elseif ($regex(%imdb,/'og:title'\s?content="(.*?)"\s?\/>/i)) {
hadd -m $sockname otitle $+($gettok($sock($sockname).mark,5,32),Title:,$chr(32),$gettok($sock($sockname).mark,6,32)) $Xchr($gettok($regml(1),1,45))
}
elseif ($regex(%imdb,/([a-z]{6,8}:)/i)) sockmark $sockname $puttok($sock($sockname).mark,$regml(1),4,32)
elseif (class="title-extra" isin %imdb) { sockmark $sockname $puttok($sock($sockname).mark,etitle:,4,32) }
elseif (($regex(%imdb,/"(.*)"/i)) && ($gettok($sock($sockname).mark,4,32) == etitle:)) {
hadd -m $sockname otitle $+($gettok($sock($sockname).mark,5,32),Title:,$chr(32),$gettok($sock($sockname).mark,6,32)) $Xchr($gettok($regml(1),1,45))
sockmark $sockname $puttok($sock($sockname).mark,natta:,4,32)
}
elseif (<h2>Storyline</h2> isin %imdb) sockmark $sockname $puttok($sock($sockname).mark,plot:,4,32)
elseif (<table class="cast_list"> isin %imdb) sockmark $sockname $puttok($sock($sockname).mark,cast:,4,32)
elseif (Release Date: isin %imdb) sockmark $sockname $puttok($sock($sockname).mark,date:,4,32)
elseif ($regex(%imdb,/itemprop="ratingCount">(.*?)<\/span>/i)) hadd -m $sockname votes $+($gettok($sock($sockname).mark,5,32),Votes:,$gettok($sock($sockname).mark,6,32)) $regml(1)
elseif ($regex(shortplot,%imdb,/<meta name="description"\scontent="(.*?)"\s/>/i)) {
hadd -m $sockname shortplot $+($gettok($sock($sockname).mark,5,32),Plot:,$chr(32),$gettok($sock($sockname).mark,6,32)) $Xchr($regml(shortplot,1))
sockmark $sockname $puttok($sock($sockname).mark,0,4,32)
}
elseif ($regex(%imdb,/itemprop="reviewCount">(.*?)<\/span>/i)) {
if ($gettok($sock($sockname).mark,4,32) == critics:) hadd -m $sockname critics $+($gettok($sock($sockname).mark,5,32),Critics:,$gettok($sock($sockname).mark,6,32)) $regml(1)
else {
hadd -m $sockname reviews $+($gettok($sock($sockname).mark,5,32),Reviews:,$gettok($sock($sockname).mark,6,32)) $regml(1)
sockmark $sockname $puttok($sock($sockname).mark,critics:,4,32)
}
}
elseif (*star-box-giga-star" iswm %imdb) { sockmark $sockname $puttok($sock($sockname).mark,votes:,4,32) }
elseif ($gettok($sock($sockname).mark,4,32) == votes: && %imdb isnum) {
hadd -m $sockname votes $+($gettok($sock($sockname).mark,5,32),Votes:,$gettok($sock($sockname).mark,6,32)) %imdb
sockmark $sockname $puttok($sock($sockname).mark,nothing,4,32)
}
elseif ($gettok($sock($sockname).mark,4,32) == Critics:) {
if ($regex(%imdb,/>([\d\x2C]+)\sreviews<\/a>/i)) hadd -m $sockname critics $+($gettok($sock($sockname).mark,5,32),Critics:,$gettok($sock($sockname).mark,6,32)) $regml(1)
}
elseif ($gettok($sock($sockname).mark,4,32) == runtime:) {
if ($regex(%imdb,/<time.*>(.*?)<\/time>/i)) {
hadd -m $sockname runtime $+($gettok($sock($sockname).mark,5,32),Runtime:,$gettok($sock($sockname).mark,6,32)) $regml(1)
sockmark $sockname $puttok($sock($sockname).mark,$v1,4,32)
tokenize 32 $sock($sockname).mark
hadd -m $sockname link $+($6,$5,Link:,$chr(32),$7,http://www.imdb.com,$3)
if ($hget($sockname,lineone)) put $1-2 $regsubex($v1,/([\S]+)/g,$hget($sockname,\t))
if ($hget($sockname,linetwo)) put $1-2 $regsubex($v1,/([\S]+)/g,$hget($sockname,\t))
if ($hget($sockname,linethree)) put $1-2 $regsubex($v1,/([\S]+)/g,$hget($sockname,\t))
hfree $sockname
sockclose $sockname
return
}
}
elseif ($gettok($sock($sockname).mark,4,32) == genres:) {
if ($regex(%imdb,/>([^<]*)<\/a>/g)) hadd -m $sockname genres $addtok($hget($sockname,genres),$regml(1),32)
elseif (</div> isin %imdb) {
hadd -m $sockname genres $+($gettok($sock($sockname).mark,5,32),Genres:,$gettok($sock($sockname).mark,6,32)) $hget($sockname,genres)
sockmark $sockname $puttok($sock($sockname).mark,$v1,4,32)
}
}
elseif ($gettok($sock($sockname).mark,4,32) == director:) {
if ($regex(%imdb,/"name">(.*?)<\/span>/i)) hadd -m $sockname director $+($gettok($sock($sockname).mark,5,32),Director:,$gettok($sock($sockname).mark,6,32)) $Xchr($regml(1))
elseif (</div> isin %imdb) sockmark $sockname $puttok($sock($sockname).mark,$v1,4,32)
}
elseif ($gettok($sock($sockname).mark,4,32) == writer:) {
if ($regex(%imdb,/"name">(.*?)<\/span>/i)) hadd -m $sockname writer $+($gettok($sock($sockname).mark,5,32),Writer:,$gettok($sock($sockname).mark,6,32)) $Xchr($regml(1))
elseif (</div> isin %imdb) sockmark $sockname $puttok($sock($sockname).mark,$v1,4,32)
}
elseif ($gettok($sock($sockname).mark,4,32) == country:) {
if ($regex(%imdb,/>(.*?)<\/a>/)) set %IMDb.Country $+($iif(%IMDb.Country,$+($v1,$chr(44))),$Xchr($regml(1)))
elseif (</div> isin %imdb) {
sockmark $sockname $puttok($sock($sockname).mark,$v1,4,32)
hadd -m $sockname country $+($gettok($sock($sockname).mark,5,32),Country:,$gettok($sock($sockname).mark,6,32)) %IMDb.Country
unset %IMDb.Country
}
}
elseif ($gettok($sock($sockname).mark,4,32) == language:) {
if ($regex(%imdb,/>([^<]*)<\/a>/)) set %IMDb.Language $+($iif(%IMDb.Language,$+($v1,$chr(44))),$Xchr($regml(1)))
elseif (</div> isin %imdb) {
sockmark $sockname $puttok($sock($sockname).mark,$v1,4,32)
hadd -m $sockname language $+($gettok($sock($sockname).mark,5,32),Language:,$gettok($sock($sockname).mark,6,32)) %IMDb.Language
unset %IMDb.Language
}
}
elseif ($gettok($sock($sockname).mark,4,32) == plot:) {
if ($regex(%imdb,/<p>(.*)/)) {
tokenize 32 $sock($sockname).mark
hadd -m $sockname plot $6 $+($5,Plot:,$6) $Xchr($regml(1))
sockmark $sockname $puttok($sock($sockname).mark,0,4,32)
}
}
elseif ($gettok($sock($sockname).mark,4,32) == cast:) {
if ($regex(%imdb,/href="\/name\/.*\/">([^<]*)<\/a>/)) set %IMDb.Cast $+($iif(%IMDb.Cast,$+($v1,$chr(44))),$Xchr($regml(1)))
elseif ($regex(%imdb,/alt="(.*?)"/)) set %IMDb.Cast $addtok(%IMDb.Cast,$Xchr($regml(1)),44)
elseif (</table> isin %imdb) {
sockmark $sockname $puttok($sock($sockname).mark,0,4,32)
hadd -m $sockname cast $+($gettok($sock($sockname).mark,5,32),Cast:,$gettok($sock($sockname).mark,6,32)) %IMDb.Cast
unset %IMDb.Cast
tokenize 32 $sock($sockname).mark
sockmark $sockname $deltok($sock($sockname).mark,10-,32)
}
}
elseif ($gettok($sock($sockname).mark,4,32) == date:) {
if ($regex(%imdb,/>(.*?)<\/time>/i)) {
sockmark $sockname $puttok($sock($sockname).mark,notag:,4,32)
tokenize 32 $sock($sockname).mark
hadd -m $sockname date $+($5,Release Date:,$chr(32),$6,$regml(1))
}
}
elseif (watch trailer isin %imdb && $regex(%imdb,/<a\shref="([^<]*)"\sonclick="/)) {
tokenize 32 $sock($sockname).mark
hadd -m $sockname trailer $+($5,Trailer:,$chr(32),$7,http://www.imdb.com,$regml(1))
}
elseif (Reviews: isin %imdb || </html> isin %imdb) {
tokenize 32 $sock($sockname).mark
hadd -m $sockname link $+($6,$5,Link:,$chr(32),$7,http://www.imdb.com,$3)
if ($hget($sockname,lineone)) put $1-2 $regsubex($v1,/([\S]+)/g,$hget($sockname,\t))
if ($hget($sockname,linetwo)) put $1-2 $regsubex($v1,/([\S]+)/g,$hget($sockname,\t))
if ($hget($sockname,linethree)) put $1-2 $regsubex($v1,/([\S]+)/g,$hget($sockname,\t))
hfree $sockname
sockclose $sockname
return
}
elseif ($regex(%imdb,/star-box-giga-star">\s?(.*?)\s?<\/div>/i)) {
var %L $round($regml(1),0), %R $calc(10 - %L)
tokenize 32 $sock($sockname).mark
hadd -m $sockname rating $+($5,Rating:,$chr(32),$5,$chr(91),$10,$str(*,%L),$11,$str(*,%R),$5,$chr(93),$6) $regml(1)
}
}
}
alias -l AddMark { sockmark $sockname $addtok($sock($sockname).mark,$1-,32) }
alias -l Xchr {
var %return $regsubex($regsubex($1-,/&#x([A-F0-9]{1,2});/g,$chr($base($regml(\n),16,10))),/&#([0-9]{2});/g,$chr(\1))
return $replacecs(%return,–,,·,·,»,»,«,«,Ü,Ü,ü,ü,Á,Á,á,á,É,$&
É,é,é,Í,Í,í,í,Ó,Ó,ó,ó,Ñ,Ñ,ñ,ñ,Ú,Ú,ú,ú, ,$chr(32),$&
æ,æ,",")
}
alias -l Put {
if (!$regex($1,/(\.|^)(msg|notice|echo)$/Si)) || (!$3) { return }
var %tokens $0, %Tstart 4, %Dtimer 1500
if ($timer($+(Put,$2,$network)).secs) { %Dtimer = $calc($v1 * 1000) }
while ($len($($+($,%Tstart,-,%tokens),2)) > 430) {
dec %tokens
if ($len($($+($,%Tstart,-,%tokens),2)) <= 430) {
.timer -m 1 %Dtimer $1-3 $($+($,%Tstart,-,%tokens),2))
inc %Dtimer 1500
%Tstart = $calc(%tokens + 1)
%tokens = $0
}
}
.timer -m 1 %Dtimer $1-3 $($+($,%Tstart,-,%tokens),2))
.timer $+ $+(Put,$2,$network) -m 1 $calc(%Dtimer + 1500) noop
}
alias -l bintween {
var %count = 1, %mark = 0, %mark2 = 0
while (%count <= $4) {
if ($bfind($1, %mark2, $2).text) {
%mark = $calc($bfind($1, %mark2, $2).text + $len($2))
if ($bfind($1, %mark, $3).text) {
%mark2 = $bfind($1, %mark, $3).text
}
else { return 0 }
}
else { return 0 }
inc %count
}
return $bvar($1, $iif(%mark > 0,%mark,1), $calc(%mark2 - %mark)).text
}
I've been using a slightly modified version of this script for years and it wasn't until maybe a few weeks ago that I noticed it will always reply with "Sorry - Cannot find movie name" and I have no idea where to look to try and fix it. Does anyone have a fix? This script gave the best output of text and my channel users and I really loved using it.
This script is working fine with Ford's version up top.
As for your edit...
var Red $+($chr(15),$chr(2))
;;;; Change %textcolor to the color you want for normal text
var Black $+($chr(15),$chr(3),04)
;;;; Change %linkcolor to the color/format you want for links
var Blue $+($chr(15),$chr(31))
;;;; Change %ratingcolor+ to the color you want for the positive stars in the rating.
var Yellow $+($chr(15),$chr(3),04)
;;;; Change %ratingcolor- to the color you want for the negative stars in the rating.
var Black $+($chr(15),$chr(3),14)
is not going to work
..and you would need to change the Google sockread to the one in Ford's version up top, which is seemingly why the search won't work.
Hope that helps.
Well, you could just take Ford's version, which is what you need.
But, that has a few trailing characters that aren't supposed to be there... http://pastebin.com/fUxVWtQC should work very well for you.
As for CHANGING the colour.. only change the number
var %textcolor $+($chr(15),$chr(3),04)
"04" being Red.
[4:38pm] <~Stewie> !imdb Spectre
[4:38pm] ThunderBolt Searching For: Spectre .............
[4:38pm] ThunderBolt Title: Spectre (2015) Rating: [**] 7.0 Votes: 176,951 Reviews: 817 user Critics: 514 critic Genres: Action Adventure Thriller Runtime: 148 min Director: Sam Mendes Language: English,Spanish,Italian,German,French Country: UK,USA
[4:38pm] ThunderBolt Plot: Directed by Sam Mendes. With Daniel Craig, Christoph Waltz, Léa Seydoux, Ralph Fiennes. A cryptic message from Bond's past sends him on a trail to uncover a sinister organization. While M battles political forces to keep the secret service alive, Bond peels back the layers of deceit to reveal the terrible truth behind SPECTRE.
[4:38pm] ThunderBolt Cast: Daniel Craig,Christoph Waltz,Léa Seydoux,Ralph Fiennes,Monica Bellucci,Ben Whishaw,Naomie Harris,Dave Bautista,Andrew Scott,Rory Kinnear,Jesper Christensen,Alessandro Cremona,Stephanie Sigman,Tenoch Huerta,Adriana Paz Link: http://www.imdb.com/title/tt2379713/
It works... Did you change to what I gave you?
absolutely not, BTW I use mirc version 7.38. And here's the script which is in my remotes. http://pastebin.com/SYN3CQ9K , Compare it with your script. You will find it same
check variables tab in scripts editor for %imdb and delete it all.
Also after checking the raw in your pastebin, the color codes aren't even being noticed. No input for it.
example: http://pastebin.com/3pPqjTQm <---click RAW and notice how i have input to activate the color code
@rebel9 - There is no need for the colour codes.
//echo $+($chr(15),$chr(3),04) Test
the "$chr(3)" is the same thing.
also it shows danish title insted of original title thou i use otitle in %lineone.
here is a pastebin of my source for two diff movies.
We're the millers - http://pastebin.com/rr7FM6XA
planes - http://pastebin.com/nSY3EiDF
would like it to always show the us/uk title.
Like in my other post/reply i made some days ago (which ain't fixed yet) i have same problem as explodedk.
And yet your new modify still dont fix it. On my german VPS i still get German titles with the imdb script.
I tired with your new code and searched for: The internship and the bot ends up with:
Title: Prakti.com (2013) Genres: Comedy Runtime: 119 min Link: http://www.imdb.com/title/tt2234155/
You can look at the source code here: http://pastebin.com/wdcrgYPy
So i guess the code you use to get title from
doesn't seem to work properly :(
The output seems to come out with parts missing sometimes, then other times it is there and it also just picks out the wrong/different result at times :-
[20:13:23] !imdb carrie
[20:13:26] Title: 07 Carrie (2013)
[20:13:27] Plot: 07 Directed by Kimberly Peirce. With Chloë Grace Moretz, Julianne Moore, Gabriella Wilde, Portia Doubleday. A reimagining of the classic horror tale about Carrie White, a shy girl outcast by her peers and sheltered by her deeply religious mother, who unleashes telekinetic terror on her small town after being pushed too far at her senior prom.
[20:13:28] 07Link: http://www.imdb.com/title/tt1939659/
[20:13:36] !imdb carrie
[20:13:40] Title: 07 Carrie (1976) Rating: [07@@@@@@@14@@@]07 7.4 Votes:07 86,603 Reviews:07 438 user Genres:07 Horror Thriller Runtime:07 98 min Director:07 Brian De Palma Language:07 English Country:07 USA
[20:13:42] Plot: 07 Directed by Brian De Palma. With Sissy Spacek, Piper Laurie, Amy Irving, John Travolta. A young, abused and timid 17-year-old girl discovers she has telekinesis, and gets pushed to the limit on the night of her school's prom by a humiliating prank.
[20:13:43] Cast:07 Sissy Spacek,Piper Laurie,Amy Irving,William Katt,John Travolta,Nancy Allen,Betty Buckley,P.J. Soles,Priscilla Pointer,Sydney Lassick,Stefan Gierasch,Michael Talbott,Doug Cox,Harry Gold,Noelle North 07Link: http://www.imdb.com/title/tt0074285/
[20:14:36] !imdb carrie
[20:14:40] Title: 07 Carrie (2013) Rating: [07@@@@@@14@@@@]07 6.4 Votes:07 12,664 Reviews:07 127 user Genres:07 Drama Horror Runtime:07 100 min Director:07 Kimberly Peirce Language:07 English
[20:14:42] Plot: 07 Directed by Kimberly Peirce. With Chloë Grace Moretz, Julianne Moore, Gabriella Wilde, Portia Doubleday. A reimagining of the classic horror tale about Carrie White, a shy girl outcast by her peers and sheltered by her deeply religious mother, who unleashes telekinetic terror on her small town after being pushed too far at her senior prom.
[20:14:43] Cast:07 Julianne Moore,Chloë Grace Moretz,Gabriella Wilde,Portia Doubleday,Alex Russell,Zoë Belkin,Ansel Elgort,Samantha Weinstein,Karissa Strain,Judy Greer,Katie Strain,Barry Shabaka Henley,Demetrius Joyette,Arlene Mazerolle,Evan Gilchrist 07Link: http://www.imdb.com/title/tt1939659/
Would it be possible to add another command, or maybe change the purpose of @imdb to show something other than %lineone %linetwo and %linethree? The reason I ask is because !imdb messages the channel using these settings:
var %lineone otitle rating genres runtime
var %linetwo shortplot
var %linethree director writer country language
But I would also like to have an @imdb that would show different information, preferably a review if that's at all possible? I tried adding this myself but if I'm honest, even tinkering with this script I'm out of my depth, I couldn't possibly add anything to it.
I understand that this is quite a big request, and therefore may not be possible, but I figured it's at least worth asking about.
Thanks in advance for any reply, and thank you very much for this fantastic script.
@NotFaux A script showing external reviews would be impossible unless you just wanted the links.
A script showing user reviews would be possible , but it would be a script independent of this one.
This script only reads the main page and user reviews are on a separate page.
It sounds interesting and I think it would make a very nice script but I simply don't have time to make it right now.
If you contact me on irc and post it in my channel as a request, I'll log it and get to it at some point in the future.
I addition, someone else in the channel may feel like coding something and write it for you.
irc.geekshed.net #Script-Help
My server is hosted in Germany, which means i get german titles off imdb which is annoying.
And so far i can see in your code: f ($regex(%imdb,/class="title-extra"\sitemprop="name">([^<]*)/i))
is where original title is. But it doesn't work. The echo it output just write out "[10:47:30] set" and nothing else.
@beni .As I stated in my last comment, I am using "otitle" and it's working fine.
Referring to lines of code is not helping me see what your problem is.
Are you using "otitle" ??
From the setup in the script:
;;;; You can change the way this script prints out by editing
;;;; %lineone, %linetwo and %linethree below.
;;;; tags must be valid and separated by a space.
;;;; valid tags are as follows: title rating votes genres
;;;; runtime director writer language country date plot
;;;; shortplot cast link trailer reviews critics
;;;; If you want to omit a line, just change it to 0
;;;; Use title instead of otitle if you want the title in the language related to your ip address
var %lineone otitle rating votes reviews critics genres runtime director writer language country date
hi ford great script
i found the rating is wrong not 4.8 imdb page says 6.5
b_o_t: Mods copy and paste these -->> !setnow Olympus Has Fallen (2013) ? 4.8/10 ? Action Thriller
the 4.8 is for the movie Abduction which is lower on the imdb page
also shortplot is showing director/actor info as well as plot
makes it to spammy
Hey Ford, you have many scripts that are activated by doing +
I'm not that good at regex
I just updated the code with what I'm using. It shouldn't be different but idk ;/
[12:45:15] <!Ford_Lawnmower> @imdb iron man 3
[12:45:15] Searching For: iron man 3 .............
[12:45:20] Title: Iron Man 3 (2013) Rating: [**] 6.2 Votes: 139,009 Reviews: 768 user Critics: 419 critic Genres: Action Adventure Sci-Fi Runtime: 130 min Director: Shane Black Language: English Country: USA,China
[12:45:21] Plot: Directed by Shane Black. With Robert Downey Jr., Gwyneth Paltrow, Don Cheadle, Guy Pearce. When Tony Stark's world is torn apart by a formidable terrorist called the Mandarin, he starts an odyssey of rebuilding and retribution.
[12:45:23] Cast: Robert Downey Jr.,Gwyneth Paltrow,Don Cheadle,Guy Pearce,Rebecca Hall,Jon Favreau,Ben Kingsley,James Badge Dale,Stephanie Szostak,Paul Bettany,William Sadler,Dale Dickey,Ty Simpkins,Miguel Ferrer,Xueqi Wang Link: http://www.imdb.com/title/tt1300854/
Did you try the updated code ovelayer? It could have been different. I've made so many different edits of this, I really don't know.
One thing to consider. !imdb will notice the user so something could be blocking that. ie. the bot is not registered/identified and the user calling the script has usermode +R set.
My box is outside US so it wont let me take eng title possible you can help out?
For some reason it wont take the title from above the "(original title)"
http://pastebin.com/ptbqZGFR
[size=16]Is it possible to get it to pull US/ENG title only?[/size]
As in no mater where the BOT/you're located it will pull US/ENG title ?
I've got My bot hosted on server in France and would like it to pull US/ENG title no mater what movie you search for.
As it is now when it's a movie that isn't ENG/US it will pull it either French or original title... would like it to pull US/ENG no mater what.
This possible or am I gonna have to get it in either French and/or the original title ?
I think this solves that issue MashhitDK : http://pastebin.com/6qKGJ9F0
Let me know if it doesn't
Thank you so much @FordLawnmower
Am gonna test it now and report back...
But thanks none the less... really do appreciate it <3
EDiT
It ain't working... tried doing a search for Three Colors: Blue
and I'm getting Danish version on My test client and French on My bot... / it's stilling pulling iNFO out from IP...
And it's pulling from IP no mater if I set it to use oTitle or Title... both will give Me the same respond.
Not sure that ain't because of an error here...
Will check back later when I've removed everything else and see if that makes a difference.
Here is complete output from DK host @ http://pastebin.com/irVELPKT
Having same problem when adding to bot it just pulls from France instead cause that's where bot is hosted.
Above is on Despicable Me 2 which it pulls DK title from as you'll be able to see.
EDiT:
Fixed it Myself... pulling original title from line 348-349 and year from 347
But if you've got a "fix" for pulling US title every time no mater what I would still prefer that.
if ($between(%imdb,<a href="/year/,/,1)) { set -u1 %IMDByear ( $+ $v1 $+ ) | halt }
elseif (<span class="title-extra" itemprop="name"> isin %imdb) { set %imdbx $remove(%imdb,"title-extra","name")
if ($between(%imdbx,",",1)) { unset %imdbx | hadd -m $sockname otitle $+($gettok($sock($sockname).mark,5,32),Title:) $Xchr($regml(1)) %IMDByear }
halt
}
elseif (%imdbx && $between(%imdb,",",1)) { unset %imdbx | hadd -m $sockname otitle $+($gettok($sock($sockname).mark,5,32),Title:) $Xchr($regml(1)) %IMDByear | halt }
Is what I've added and seems to work for Me so far... haven't tested on host yet since I'm still playing with My new fail.
Not sure above will work for other... mine is kind of heavily edited to pull more stats / shortplot so above might not for people with same problem and standard script... but thought I would share in case it could help others out.
Know the above code isn't pretty... but working... added to the top of the sockread event BTW...
just after line 111
I've actually run into a weird problem.
«13:03:51» {~Melisandre} .imdb fight club
«13:03:52» {&GLaDOS} Searching For: fight club
«13:03:57» {&GLaDOS} Title: Fight Club (1999) Rating: [**] 7.6 Genres: Drama Runtime: 139 min
«13:03:59» {&GLaDOS} Link: http://www.imdb.com/title/tt0137523/
The actual rating for Fight Club on IMDB is 8.9. All of the ratings are like this for me.
I got something weird a minute ago:
(03:28:48 am) <~hxck> !imdb jack the giant killer 2013
(03:28:48 am) -Victoria- Searching For: jack the giant killer 2013 .............
(03:28:51 am) -Victoria- Link: http://www.imdb.com/title/tt1351685/fullcredits<span/
Not sure what caused it as I just updated the snippet a minute before I used it.
anychance of adding in some features like
!nowshowing (shows movies currently playing in theaters)
!commingsoon (shows upcomming movies in theaters)
!topmovies (shows current top 10 movies in theaters)
kinda like this tcl script
http://www.hawkee.com/snippet/9540/
but for mirc lol
would be soooo awsomely cool as your imdb script seems to the the only currently working and supported script for mirc!
we soooooooo appreciate you!
<@C-b0t> (original title) Rating: [**] 7 Votes: 3,966 Reviews: 10 user Critics: 37 critic Genres: Comedy Runtime: 84 min Director: Daniel Cohen Writer: Daniel Cohen Language: French,Spanish,Japanese,English Country: France,Spain
it doesn't show the original title anymore
for the rest great scripts/snippets you are sharing FordLawn !!!
@ChUcKst3r I updated the code here with the version I am using. Please try the code at the top of the page and let me know if you still have a problem.
If you are still getting the wrong info for the title, post what you searched for so I can try to reproduce the error.
[08:52:49] <+ChUcKst3r> @imdb comme un chef
[08:52:49] <@C-b0t> Searching For: comme un chef .............
[08:53:02] <@C-b0t> (original title) Rating: [**] 7 Votes: 3,970 Reviews: 10 user Critics: 37 critic Genres: Comedy Runtime: 84 min Director: Daniel Cohen Writer: Daniel Cohen Language: French,Spanish,Japanese,English Country: France,Spain
[08:53:02] <@C-b0t> Cast: Jean Reno,Michaël Youn,Raphaëlle Agogué,Julien Boisselier,Salomé Stévenin,Serge Larivière,Issa Doumbia,Bun-hay Mean,Pierre Vernier,Santiago Segura,Geneviève Casile,André Penvern,Rebecca Miquel,James Gerard,Henri Payet Link: http://www.imdb.com/title/tt1911553/
thats what i get, even after the update.
ps. even gets the error with wel known movies like the godfather , also the rating isn't correct
[08:55:32] <@C-b0t> Searching For: the godfather .............
[08:55:44] <@C-b0t> (original title) Rating: [**] 7.4 Votes: 653,473 Reviews: 1,567 user Critics: 171 critic Genres: Crime Drama Runtime: 175 min Director: Francis Ford Coppola Language: English,Italian,Latin Country: USA
[08:55:45] <@C-b0t> Cast: Marlon Brando,Al Pacino,James Caan,Richard S. Castellano,Robert Duvall,Sterling Hayden,John Marley,Richard Conte,Al Lettieri,Diane Keaton,Abe Vigoda,Talia Shire,Gianni Russo,John Cazale,Rudy Bond Link: http://www.imdb.com/title/tt0068646/
with a score of 9.2 on imdb.com
Hmm I still don't get that, so I'm guessing it's a regional issue.
[18:57:09] Title: Comme un chef (2012) Rating: [**] 6.1 Votes: 3,977 Reviews: 10 user Critics: 37 critic Genres: Comedy Runtime: 84 min Director: Daniel Cohen Writer: Daniel Cohen Language: French,Spanish,Japanese,English Country: France,Spain
[18:57:11] Cast: Jean Reno,Michaël Youn,Raphaëlle Agogué,Julien Boisselier,Salomé Stévenin,Serge Larivière,Issa Doumbia,Bun-hay Mean,Pierre Vernier,Santiago Segura,Geneviève Casile,André Penvern,Rebecca Miquel,James Gerard,Henri Payet Link: http://www.imdb.com/title/tt1911553/
What country are you in ?
Try this edit and let me know if you get english titles. http://pastebin.com/6qKGJ9F0
I made a small change can you please try this again: http://pastebin.com/6qKGJ9F0
Sorry, I'm really just guessing at it because imdb now generates a different page for every language.
The problem that I have is I can't see the source page for non-english ip's.
If someone could pastebin the page source for me, I can fix this in a couple of minutes.
Thanks incognitus :)
I didn't realize that it was showing both languages.
Try this edit: http://pastebin.com/6qKGJ9F0
@s3ff3r To test the script type /eimdb movienamehere (From the client that is running the script)
If this works then the script is working fine.
Something to consider::
This script is made for a bot and requires a second client to trigger it.
You will not see the results of a movie search from the client running the script unless you are using the /eimdb command.
The output to the screen is suppressed to conserve the bots resources.
@hitmanukDee Scroll to the top of the script and there are instructions on how to change all the output.
Quote from the top of the script::
;;;; You can change the way this script prints out by editing
;;;; %lineone, %linetwo and %linethree below.
;;;; tags must be valid and separated by a space.
;;;; valid tags are as follows: title rating votes genres
;;;; runtime director writer language country date plot
;;;; shortplot cast link trailer reviews critics
;;;; If you want to omit a line, just change it to 0
var %lineone title rating votes reviews critics genres runtime director writer language country date
var %linetwo shortplot
var %linethree cast link trailer
Edit:: I see what you are getting is the shortplot. Sometimes the short summary on imdb includes the main cast members. Your options are to use the regular plot or remove the cast from %linethree .
Hello, i just came across this script because the other i was using no longer worked, this is perfect except when it displays the plot it gives the cast before the plot.
example:
Plot: Directed by Barry Sonnenfeld. With Will Smith, Tommy Lee Jones, Josh Brolin, Jemaine Clement. Agent J travels in time to MIB's early years in the 1960s, to stop an alien from assassinating his friend Agent K and changing history.
is it possible to make it just give the plot and not the cast? thanks
i believe westor put out a imdb if you want to use his module manager..
other then that no one has put out a working imdb or tvmaze in along time =(