例如,使用此网址 http://www.rzjets.net/aircraft/index.php?registry=F-OLRC&frstatus=1
我想解析结果页面。
我正在使用这些代码,但我的结果是空的:
var urlRzjetsNoParameters = "http://www.rzjets.net/aircraft/index.php";
string result;
using (var client = new WebClient()) {
client.QueryString.Add("registry",reg);
client.QueryString.Add("frstatus","1");
result = client.DownloadString(urlRzjetsNoParameters);
}
或
var urlRzjets = "http://www.rzjets.net/aircraft/index.php?registry={0}&frstatus=1";
var url = string.Format(urlRzjets, Uri.EscapeDataString(reg));
using (var client = new WebClient())
{
result = client.DownloadString(url);
}
如果您可以帮助我