110,571
社区成员
发帖
与我相关
我的任务
分享
<ul>
<li class=59Feb5906590759><div>[<a href="http://PRDWEB/article/List_2.html" target="_blank" title="资材价格">资材价格</a>]<A class=592005Feb0607 href="http://PRDWEB/article/200502/461708.html" title="2005年1月6日PADW1厂消耗曲线(不完整)" target="_blank">2005年1月6日PADW1厂消耗曲线(不完整)</A></div><span><font color='red'>2005-01-06</font></span></li>
<li class=16Feb1606160816><div>[<a href="http://PRDWEB/article/List_2.html" target="_blank" title="资材价格">资材价格</a>]<A class=162005Feb0608 href="http://PRDWEB/article/200502/461743.html" title="2005年1月6日PADW1厂消耗曲线" target="_blank">2005年1月6日PADW1厂消耗曲线</A></div><span><font color='red'>2005-01-06</font></span></li>
<li class=16Feb1606160816><div>[<a href="http://PRDWEB/article/List_2.html" target="_blank" title="资材价格">资材价格</a>]<A class=162005Feb0608 href="http://PRDWEB/article/200502/461742.html" title="2005年1月6日PADW2厂消耗曲线" target="_blank">2005年1月6日PADW2厂消耗曲线</A></div><span><font color='red'>2005-01-06</font></span></li>
<li class=15Feb1506150815><div>[<a href="http://PRDWEB/article/List_2.html" target="_blank" title="资材价格">资材价格</a>]<A class=152005Feb0608 href="http://PRDWEB/article/200502/461741.html" title="2005年1月6日PADW6厂消耗曲线" target="_blank">2005年1月6日PADW6厂消耗曲线</A></div><span><font color='red'>2005-01-06</font></span></li>
<li class=15Feb1506150815><div>[<a href="http://PRDWEB/article/List_2.html" target="_blank" title="资材价格">资材价格</a>]<A class=152005Feb0608 href="http://PRDWEB/article/200502/461740.html" title="2005年1月6日PADW8厂消耗曲线" target="_blank">2005年1月6日PADW8厂消耗曲线</A></div><span><font color='red'>2005-01-06</font></span></li>
</ul>
private void button1_Click(object sender, EventArgs e)
{
HTMLReader.url = "http://PRDWEB/Mat.html";
HTMLReader.MidKey = "";
HTMLReader.headLength = 0;
HTMLReader.startKey = "<div>[<a href=\"http://PRDWEB/article/List_2.html\" target=\"_blank\" title=\"资材价格\">资材价格</a>]";
HTMLReader.endKey = " title=\"2005年";
string html = HTMLReader.GetHtml();
string mgsy = HTMLReader.GetValue();
///\d{6}\D{3}\d{4}
}
public static string GetValue()
{
try
{
string html;
string HtmlText = strHtml;
if (HtmlText == null) return null;
int start, end;
start = HtmlText.IndexOf(startKey);
end = HtmlText.IndexOf(endKey);
html = HtmlText.Substring(start + startKey.Length, end - start - startKey.Length);
return html;
}
catch
{
return "";
}
}