ircnoob74 commented on a Page, Youtube url detector for mIRC  -  Jan 17, 2013

Reproducable bug. Sometimes it lists the video description, sometimes it doesn't. No rhyme or reason. Didn't happen in older versions prior to youtube changing stuff up.

[07:04pm] http://www.youtube.com/watch?v=rN7pkFNEg5c
[07:04pm] You Views: 292,302 Uploader: aaandre321 Upload Date: Jul 7, 2008
[07:04pm] http://www.youtube.com/watch?v=rN7pkFNEg5c
[07:04pm] You: The Wire - Bunk's interrogation techniques Views: 292,302 Uploader: aaandre321 Upload Date: Jul 7, 2008

FordLawnmower  -  Jan 17, 2013

I've never seen this and I've been unable to reproduce it in several tries.

[19:40:06] <@Ford_Lawnmower> http://www.youtube.com/watch?v=rN7pkFNEg5c
[19:40:07] YouTube Title: The Wire - Bunk's interrogation techniques Views: 292,302 Uploader: aaandre321 Upload Date: Jul 7, 2008
[19:40:57] <@Ford_Lawnmower> http://www.youtube.com/watch?v=rN7pkFNEg5c
[19:40:58] YouTube Title: The Wire - Bunk's interrogation techniques Views: 292,302 Uploader: aaandre321 Upload Date: Jul 7, 2008
[19:41:02] <@Ford_Lawnmower> http://www.youtube.com/watch?v=rN7pkFNEg5c
[19:41:03] YouTube Title: The Wire - Bunk's interrogation techniques Views: 292,302 Uploader: aaandre321 Upload Date: Jul 7, 2008
[19:41:07] <@Ford_Lawnmower> http://www.youtube.com/watch?v=rN7pkFNEg5c
[19:41:08] YouTube Title: The Wire - Bunk's interrogation techniques Views: 292,302 Uploader: aaandre321 Upload Date: Jul 7, 2008
[19:41:16] <@Ford_Lawnmower> http://www.youtube.com/watch?v=rN7pkFNEg5c
[19:41:17] YouTube Title: The Wire - Bunk's interrogation techniques Views: 292,302 Uploader: aaandre321 Upload Date: Jul 7, 2008
[19:41:26] <@Ford_Lawnmower> http://www.youtube.com/watch?v=rN7pkFNEg5c
[19:41:27] YouTube Title: The Wire - Bunk's interrogation techniques Views: 292,302 Uploader: aaandre321 Upload Date: Jul 7, 2008

If I can't reproduce it , I won't be able to fix it. If you have anymore information that you think will help, please post it.

ircnoob74  -  Jan 18, 2013

I've slightly modified the script, but I don't see why it would cause this. Posted below. Do you see any issues here?

;YouTube Link detector by Ford_Lawnmower irc.Geekshed.net #Script-Help
alias -l GetLinkDetectorForYoutube {
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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)
  ;;;; Change %logo to change the YouTube logo
  var %logo $+($chr(2),$nick))
  ;;;; Change %tagSelection to choose the tags you want displayed.
  ;;;; Valid tags are: title views likes dislikes uploader and date 
  var %tagSelection title views likes dislikes uploader date
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;End Setup;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  var %sockname $+(LinkDetectorForYoutube,$network,$2,$ticks,$r(1,1000))
  hadd -m %sockname tags %tagSelection
  hadd %sockname tagcolor %tagcolor
  hadd %sockname textcolor %textcolor
  hadd %sockname logo %logo
  sockopen %sockname www.youtube.com 80
  sockmark %sockname $1-2 $+(/watch?v=,$3)
}

And this:

elseif ($regex(%LinkDetectorForYoutube,/class="long-title".*title="(.*?)">/)) {
      hadd $sockname title $+($hget($sockname,tagcolor),:) $+($hget($sockname,textcolor),$regml(1))
    }
    elseif ($regex(%LinkDetectorForYoutube,/<meta\sname="title"\scontent="(.*?)">/)) {
      hadd $sockname title $+($hget($sockname,tagcolor),:) $+($hget($sockname,textcolor),$regml(1))
ircnoob74  -  Jan 18, 2013

I just copied and pasted the original script and it does the same thing. I'm still using mirc 6.2, if that matters.

FordLawnmower  -  Jan 19, 2013

This script probably won't work with 6.2 . I don't have the time to sort it out and see what issues it would have with 6.2 but I'm sure there are some. Most likely the issue is that the variable length being to short to read the youtube page. 6.2 is 7 years old and you will have trouble with lots of newer scripts if you keep using it. To upgrade, all you have to do is replace the mIRC.exe with a newer one. I would suggest 6.35 if you have a lot of older scripts.

ircnoob74  -  Jan 23, 2013

I see, thanks. Any idea why likes and dislikes no longer work?

Sign in to comment

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.