中国银行外汇牌价抓取代码不再起作用了吗?

来源:百度知道 编辑:UC知道 时间:2024/05/23 19:14:16
我的代码是ASP.NET的,于2008年12月13日突然失效,不知为什么。
抓取到的html代码只有<head>部分。请高手指点!
代码如下:
string html = "";

try
{
DataSet1.WaiHuiDataTable whDT = new DataSet1.WaiHuiDataTable();
string url = "http://www.boc.cn/cn/common/whpj.html";
html = new MyResponse(url).Html;
string pattern = "<td width=\"86\" align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\" class=\'nav\'>(.*?)</td>";
MatchCollection matches = Regex.Matches(html, pattern, RegexOptions.IgnoreCase);
string strResult;
i=matches.Count;
strResult = matches[18].Result("$1");
whDT.AddWaiHuiRow("美元", decimal.Pa

丫网站改版了.
现在的网址是http://www.boc.cn/sourcedb/whpj/
你试着编进去,希望对你有帮助

换地址了。。。。