I m在网络报废器上工作。 以下案文显示了这一问题结束时给出的法典的结果,它从一页中得出了所有作者的价值观。
我只想获得包含<代码>docid=的数值。
指数.php?pageid=a45475a11ec72b843d74959b60fd7bd64556e8988583f
页: 1
摘要_of_documents.php
指数.php?pageid=a45475a11ec72b843d74959b60fd7bd64579b861c1d7b
页: 1
指数.php?pageid=a45475a11ec72b843d74959b60fd7bd64579e0509c7f0&apform=judiciary
decisions.php?doctype=Decisions / Signed Resolutions&docid=1263778435388003271页: 1sam
decisions.php?doctype=Decisions / Signed Resolutions&docid=12637789021669321156页: 1sam
?doctype=Decisions / Signed Resolutions&year=1986&month=January页: 1head
?doctype=Decisions / Signed Resolutions&year=1986&month=February页: 1head
该法典:
string url = urlTextBox.Text;
string sourceCode = Extractor.getSourceCode(url);
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(sourceCode);
List<string> links = new List<string>();
if (links != null)
{
foreach (HtmlAgilityPack.HtmlNode nd in doc.DocumentNode.SelectNodes("//a[@href]"))
{
links.Add(nd.Attributes["href"].Value);
}
}
else
{
MessageBox.Show("No Links Found");
}
if (links != null)
{
foreach (string str in links)
{
richTextBox9.Text += str + "
";
}
}
else
{
MessageBox.Show("No Link Values Found");
}
我如何能够这样做?