mIRC Home    About    Download    Register    News    Help

Print Thread
YouTube Title Announcer #270606 03/08/22 02:55 PM
Joined: Mar 2022
Posts: 9
C
CeraVea Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Mar 2022
Posts: 9
Hello,

I kind of got this script from MMX working for a very long time, and now it's not grabbing YT titles. I am not sure what the deal is. I am trying to find the author but I couldn't find him. Hehe. Maybe someone can help me get this to work again? Help?

Code



; Simple YouTube Title Announcer v0.1 - MMX 2022
; Requires mIRC v7.56+ (because of $urlget)

ON $*:TEXT:/(https\x3a\/\/|www\.)([\S]*youtube\.com[\S]+v\=|youtu\.be\/)([\S]{11})/Si:#:{
  if ($regml(3)) {
    var %url $+(https://m.youtube.com/watch?persist_app=1&app=m&v=,$regml(3))
    var %id $urlget(%url,gbi,&ytdata,yt_get_title $chan)
  }
}
alias -l yt_get_title {
  var %chan $1, %id $2
  if ($bfind($urlget(%id).target,1,/title":\{"runs":\[\{"text":"(.*?)"\}/Sig).regex) {
    msg %chan 01You00,04Tube: $yt_dehex($regml(1))
  }
}
alias -l yt_dehex {
  var %title $regsubex($1-,/\\u(.{4})/ig,$chr($base(\1,16,10)))
  return $replace(%title,\",",\\,\,\\\\,\\)
}


 


JilValentine | http://jilvalentine.de
#TLC & #northcarolina ChanMgr
Re: YouTube Title Announcer [Re: CeraVea] #270607 03/08/22 06:43 PM
Joined: Jul 2006
Posts: 3,923
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,923
I tested that code and it worked perfectly fine on 7.69

Quote
[20:40:21] <sroelse> https://www.youtube.com/watch?v=8l75Z8wil_U
[20:40:22] <Ouims> YouTube: Jedi Mind Tricks "Design in Malice" feat. Young Zee & Pacewon - Official Video
[20:40:57] <sroelse> https://www.youtube.com/watch?v=OYR5X-vihAo
[20:40:59] <Ouims> YouTube: Tinariwen & Kiran Ahluwalia Mustt Mustt
[20:41:10] <sroelse> https://www.youtube.com/watch?v=evN6DIGPIJM
[20:41:11] <Ouims> YouTube: Peter Gabriel - In Your Eyes (Secret World Live)
[20:41:21] <sroelse> https://www.youtube.com/watch?v=o-BrVkJCHgg
[20:41:22] <Ouims> YouTube: Andrew Bird - Full Performance (Live on KEXP)


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Re: YouTube Title Announcer [Re: Wims] #270608 04/08/22 01:57 AM
Joined: Mar 2022
Posts: 9
C
CeraVea Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Mar 2022
Posts: 9
updating my mirc client fixed it. thanks a lot! i knew it's just something simple. smile


JilValentine | http://jilvalentine.de
#TLC & #northcarolina ChanMgr
Re: YouTube Title Announcer [Re: Wims] #270610 04/08/22 12:02 PM
Joined: Mar 2022
Posts: 9
C
CeraVea Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Mar 2022
Posts: 9
On second thought, I'd like to see if I can add a line script for ACTION event. I tried to copy the TEXT event and replaced it with ACTION but when I did /me <youtubelink> the script does not work.


JilValentine | http://jilvalentine.de
#TLC & #northcarolina ChanMgr
Re: YouTube Title Announcer [Re: CeraVea] #270611 04/08/22 12:33 PM
Joined: Jan 2004
Posts: 1,796
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,796
The /me command assumes your cursor is in the correct editbox. Use:

/describe #channelname message