You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can parse the message to HTML and then extract links using regexp or the Cheerio DOM parser.
Example:
import{HTMLParser}from'telegram/extensions/html';import*ascherriofrom'cheerio';consthtml=HTMLParser.unparse(message,entities);const$=cherrio.load(html);// => Work with DOM like jQuery to extract your links// => $("a:contains('Your Anchor')").attr("href");
I couldn't find the way to extract a link from a hyperlink within a text from a message that was sent in a channel.
The text was updated successfully, but these errors were encountered: