Link to title from channel - 12/10/21 08:48 AM
Thanks to Talon for writing about $urlget(). And telling me another way to read links titles. Even Youtube.
I have copied Talon's code for reading all sort of links, and scripted so 1 link get extracted if the text contains as example: text link text.
I have also been reading maroons guide to remove $cr $lf $crlf from the urlget. Which mean no way to exploit this.
Since Talon and Maroons wrote this. I don't want to take credits for this script.
The new code is:
I have copied Talon's code for reading all sort of links, and scripted so 1 link get extracted if the text contains as example: text link text.
I have also been reading maroons guide to remove $cr $lf $crlf from the urlget. Which mean no way to exploit this.
Since Talon and Maroons wrote this. I don't want to take credits for this script.
The new code is:
Code
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 }