_Dean_ commented on a Page, Youtube Link Information --WORKING--  -  Feb 22, 2011

i really dont know, i didnt say u was lying

look i tested on 6.17 and that version really showed a problem, but on 7.14 no

try this alternative edit
i edited it, and this one will recognize the sockclose to hfree the hash

on *:TEXT:*youtube.com/watch?v=*:#: {
  if (!$sock(youtube)) && (!%t) {
    noop $regex($strip($1-),http:\/\/.*youtube.*\/watch\?v=(.+))
    sockopen youtube www.youtube.com 80 | sockmark youtube $chan $regml(1)
    inc -u3 %t

on *:SOCKOPEN:youtube: {
  var %x = sockwrite -n $sockname
  %x GET $+(/watch?v=,$gettok($sock(youtube).mark,2,32)) HTTP/1.1
  %x Host: www.youtube.com
  %x $crlf

on *:SOCKREAD:youtube: {
  var %ytx | sockread %ytx
  if $regex(%ytx,/<meta name="title" content="(.+)"/) { hadd -m youtube 1 1[1,0You0,4Tube] $qt($regml(1))  }
  if $regex(%ytx,/<a id="watch-username".*><strong>(.+)<\/strong><\/a>/) { hadd -m youtube 2 User: $regml(1)  }
  if $regex(%ytx,/<strong>(\d+)<\/strong>/) { hadd -m youtube 3 Viewed: $regml(1) }
  if $regex(%ytx,<span class="likes">(\d+)<\/span>.*<span class="dislikes">(\d+)<\/span>\s) { 
    msg $gettok($sock(youtube).mark,1,32) $hget(ytb,1) - $hget(ytb,2) - $hget(ytb,3) - Likes: $regml(1) Dislikes: $regml(2) 
    sockclose youtube
on *:sockclose:youtube:{
  hfree youtube
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.