Currently, I'm using this code but I've added a line or 2 so that I'd like to share the YouTube link with my friends on my IRC server - Currently, I'm echoing to myself for testing purposes but will change to msg to the channel after.

alias YouTube {
set %YTLink $1
noop $urlget($1-,gb,& $+ $ticks,ScrapeWebsiteData)
}
alias ScrapeWebsiteData {
var %b = $urlget($1).target
if ($bfind(%b,1,/<title>(.*)<\/title>/i,Title).regex) { var %title = $regml(Title,1) }
if ($bfind(%b,1,/<meta name="description".*content="([^"]+)"(?:[^>]+)?>/i,Desc).regex) { var %desc = $regml(Desc,1) }
echo -a Link : %YTLink
echo -a 1: Title: %title
echo -a 2: Description: %desc
}


Output shows

Link : https://www.y*****e.com/watch?v=JK2rqxLLMRw
1: Title: The Tiger&#39;s Apprentice Teaser Trailer (2024) - YouTube
2: Description: Film & Animation


[Linked Image from i.imgur.com]

It seems to be working, however - how do I avoid such like these i.e. &#39;s also & amp; (as shown in screenshot) or any others in the future?

Thanks