YoutubeTitle + sock script - not longer working - 08/01/15 03:08 PM
Hey all,
i used this script for posting the youtube title from a youtube link, but the script brokes, can anyone fix it?
i used this script for posting the youtube title from a youtube link, but the script brokes, can anyone fix it?
Code:
alias -l sockopenmark { sockopen $1-3 | sockmark $1 $4- } on $*:text:/(youtube\.com)\/.*v=([^&]+)|(youtu\.be)\/(.+)/Si:*: { sockopenmark $+(yt.,$calc($ticks + $rand(1,99))) www.youtube.com 80 $regml(2) msg $iif($chan,$v1,$nick)) } on *:sockopen:yt.*:{ tokenize 32 $sock($sockname).mark sockwrite -n $sockname GET /watch?v= $+ $1 HTTP/1.0 sockwrite -n $sockname HOST: www.youtube.com $+ $str($crlf,2) } on *:sockread:yt.*:{ var %v | sockread %v if ($regex(%v,/"name" content="(.+)"/)) { tokenize 32 $sock($sockname).mark $2-4 $replace($regml(1),&,$chr(38),',$chr(39),',$chr(39),",$chr(34),",$chr(34),&,$chr(38)) $5- sockclose $sockname } }