I want to extract the title image of a web page using C# in ASP.NET. I checked the windows and document objects but they don’t have a property such as title. So searching for method to extract the title image like in the page tab of the Chrome.
Share
That’s using
WebClient.DownloadData. You can also useWebClient.DownloadFileif you’re looking to store it.A further bullet-proofed approach would be to download the index page and use an HTML parser to look for the
<link>tag that specifies where the icon is supposed to be (could also be applied to apple-touch-icon or otherwise).BTW, the tags I believe you’re looking to parse are: