IMDb Title/Trailer Grabber V2

Platform:  mIRC
Published  Mar 08, 2012
Updated  Oct 10, 2013
So basicly this is based on the same idea as the youtube title grabber i made the other day. It will basicly grab the title and the trailer link to imdb urls posted in the channel.

Sample Output:

*UPDATE 10/10/2013*
Redid the code a bit and added a halt line to block it on certain networks or chans. Just uncomment th lineee and edit for your neetworks or chans that you dont want it to run in. ;-------------------------------------------;
; IMDb Title/Trailer Grabber ;
alias _imdb { var %sockname = imdbsock. $+ $rand(10000,99999) | sockopen %sockname 80 | sockmark %sockname $1- }
on *:text:*:*: {
if ($regex($strip($1-),/imdb\.com\/title\/([a-z0-9]+)/i)) {
;Uncomment this linee and edit to halt th script on certain networks or chans
;if ($network == networktohalt) || ($network == anothernetwork) || ($chan == evenchans) { halt }
_imdb $cid $chan $+(/title/,$regml(1),/)
on *:sockopen:imdbsock.*: {
if ($sockerr) { /echo -g $gettok($sock($sockname).mark,2,32) Error. | halt }
else {
sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.0
sockwrite -nt $sockname Host:
sockwrite -nt $sockname Content-type: text/html
sockwrite -nt $sockname User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
sockwrite -nt $sockname Connection: close
sockwrite -nt $sockname $crlf
on *:sockread:imdbsock.*: {
var %v | sockread %v
if ($regex(%v,/<title>(.*?)</title>/)) { sockmark $sockname $sock($sockname).mark title: $+ $encode($regml(1),m) }
if (($regex(%v,/data-video="([^"]+)"/)) && (*Watch Trailer*</* iswmcs %v)) { sockmark $sockname $sock($sockname).mark trailer: $+ $encode($regml(1),m) }
if (<div id="share-checkin"> isin %v) {
var %title = $remove($decode($gettok($wildtok($sock($sockname).mark, title:*, 1, 32), 2, 58),m), - IMDb)
var %trailer = $decode($gettok($wildtok($sock($sockname).mark, trailer:*, 1, 32), 2, 58),m)
var %output = $+($chr(02),$chr(03),01,$chr(44),08,IMDb,$chr(3)) %title $+($chr(02),.:.,$chr(32),Trailer:,$chr(32),$chr(31),,%trailer)
scid $gettok($sock($sockname).mark, 1, 32) msg $gettok($sock($sockname).mark,2,32) %output
sockclose $sockname


Sign in to comment.
Menteroth   -  Sep 23, 2013
this doesn't seem to work, or? I tried with a link like this and won't get any response posted.
Menteroth  -  Sep 23, 2013
the youtube grabber worked though.
Jibberish  -  Oct 10, 2013
Ive just posted my updated code. I had actually updated it a while ago and forgot to post it here. To keep up to date on my projects please visit the website in my profile
Menteroth  -  Oct 10, 2013
Is there any way you can fix so it takes the English title? I live in Sweden and it sends the Swedish title to the channel. I'm guessing it sees the .se from my hostname. Would be much better with English titles.
Jibberish  -  30 days ago
Sorry for the delayed response i have been in and out of the irc game for a while. Unfortunately the only way around this would be to have the bot located in the us (possibly the uk)
Sign in to comment

zelf0r   -  Mar 24, 2012
nice 1 m8..
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.