有下载页面的代码:
System.Net.WebClient client = new System.Net.WebClient();
client.Headers.Add("user-agent", "Mozilla/20.0.1");
byte[] feedBytes;
string url;
url = @"http://www.marathonbet.co.uk/en/betting/Football";
string fullPage = string.Empty;
try
{
feedBytes = client.DownloadData(url);
}
catch (System.Net.WebException)
{
return;
}
string fullPage = Encoding.UTF8.GetString(feedBytes);
结果“fullpage”仅包含页面的一部分。在浏览器中页面的加载是逐渐发生的。如何下载整页?