I need a slight/fast way to download just the content of the html of a page. Than I can catch the meta tag of it. This is my actual code:
HttpWebRequest request = WebRequest.Create(resoruce_url) as HttpWebRequest;
request.UserAgent = Request.UserAgent;
try
{
using (WebResponse response = request.GetResponse())
{
using (var reader = new StreamReader(response.GetResponseStream()))
{
var objectText = reader.ReadToEnd();
Response.Write(objectText);
}
}
}
catch (Exception e) { Response.Write(e.Message); }
the problem is it doesnt support "Javascript" as request, so the page with some controls, I just get the <noscript>
html code.
How can I do it? I can't do client side because the requested page are not in the same domains. So the only way is Server Side.
Someone says to use WebBrowser
, but I know it is a sort of "browser emulator", which requires many resources. I just need a slight solution. Any suggestions?