on *:text:*http*:#: {
if ($regex($1-,((?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+))) {
noop $urlget($regml(1),gb,& $+ $ticks,ScrapeWebsiteData)
}
}
alias ScrapeWebsiteData {
var %b = $urlget($1).target
breplace %b 10 32 13 32
if ($bfind(%b,1,/<title>(.*)<\/title>/i,Title).regex) { var %title = $replace($regml(Title,1),$cr,$chr(32),$lf,$chr(32)) }
if ($bfind(%b,1,/<meta name="description".*content="([^"]+)"(?:[^>]+)?>/i,Desc).regex) { var %desc = $replace($regml(Desc,1),$cr,$chr(32),$lf,$chr(32)) }
echo -a 1: Title: %title
echo -a 2: Description: %desc
}