Search code examples
c#asp.netasp.net-mvc-3httpresponsemeta

Extract metadata from website ASP.NET MVC3


I have been going round in circles trying to extract meta tag information from external websites. I started of with a XML approach but due to tags link doctype etc, my application kept throwing errors.

I am now taking a HttpResponse approach, I know how to get the website back and stored in a variable as a string but

I can't figure out how to extract a substring from the content in the meta tags?

I have been searching for a solution to this problem for days.


Solution

  • Use the HTML Agility Pack to download, parse and query the external HTML.