bahiense commented on a Page, YouTube URL "Detector" (v.8)  -  Jul 21, 2010

UPDATED 2 DECEMBER 2010
here http://www.hawkee.com/phpBB2/viewtopic.php?t=22062&highlight=youtube , Jethro_ come up with a solution :)


this one works ( USED TO , i keep it here just in case) ( just my small adaptation of the original here ) :)

; ********** YOUTUBE ****************************
on *:text:*youtube.com/watch?v=*:#: {
  if (!$sock(youtube)) {
    noop $regex($strip($1-),http:\/\/.*youtube.*\/watch\?v=(.{11})&?.*)
    sockopen youtube www.youtube.com 80 | sockmark youtube $+(#,>,$regml(1))
  }
}

on *:sockopen:youtube: {
  sockwrite -n $sockname GET $+(/watch?v=,$gettok($sock(youtube).mark,2,62)) HTTP/1.0
  sockwrite -n $sockname Host: www.youtube.com
  sockwrite -n $sockname $crlf
}

on *:sockread:youtube: {
  var %x | sockread %x
  if ($regex(%x,<meta name="title" content="(.+)">))  set %youtubetitle $regml(1)
  elseif ($regex(%x,<strong class="watch-view-count">(.+)</strong><br>))  set %youtubeviews $regml(1)
  elseif ($regex(%x,<span class="watch-video-date">(.+)</span>))  set %youtubedate $regml(1)
  elseif ($regex(%x,<div class="action-bar-ratings-stats yt-uix-tooltip" title="(.+)"> ))  set %youtuberating $regml(1)
  elseif ($regex(%x,<a id="watch-username" class="inline-block" href="/user/(.+)">))  set %youtubeuser $regml(1)
}

on *:sockclose:youtube: {
  msg #CHANNEL $chr(91) $+ YouTube $+ $chr(93) " $+ %youtubetitle $+ " --- %youtubeviews views $& 
    ( %youtuberating ) uploaded %youtubedate by %youtubeuser ---
  unset %youtube*
}
; ************************************************

[14:52:16] http://www.youtube.com/watch?v=wnNhxqD1FTA
[14:52:18] [YouTube] "That's the Thing about Football 2008" --- 14,602 views ( 33 likes, 1 dislikes ) uploaded by TheSwert ---

just change the name of your channel in
on *:sockclose:youtube

 Respond  
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.