利用HtmlAgilityPack抓取頁面很方便
HtmlWeb htmlWeb = new HtmlWeb();
HtmlDocument htmlDocument = htmlWeb
解決方法如下
新建一個方法來獲取 HtmlDocument
private static HtmlDocument GetHtmlDocument(string url)
{
HttpWebRequest (new Uri(@url)) as HttpWebRequest; =
Stream stream = webResponse
HtmlDocument htmlDocument = new HtmlDocument();
htmlDocument
return htmlDocument; }
根據@無機の劍 的評論
HtmlWeb htmlWeb = new HtmlWeb();
htmlWeb
From:http://tw.wingwit.com/Article/program/net/201311/13856.html