I am trying to access information on a web page. The first time I did it. The problem is that it is too slow. By doing this on only one page, which loads very quickly in the browser, but forever here. The only thing I need here is the HTML behind the page, so I have to ask if my code is loading images somehow? Any help would be helpful in speeding up this process.
string url;
HttpWebRequest pedido = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse resposta = (HttpWebResponse)pedido.GetResponse();
StreamReader SR = new StreamReader(resposta.GetResponseStream());
string html;
string tituloTemp = "";
do
{
html = SR.ReadLine();
if (html.Contains("<title>"))
tituloTemp = html;
} while (!(html.Contains("<title>")));
SR.Close();
source
share