2016-11-12 69 views

回答

1

假設你將使用HTML解析器HtmlAgilityPack(你必須標記你的問題):

WebClient client = new WebClient(); 
string downloadString = client.DownloadString("http://www.mywebsite/mypage"); 

HtmlDocument doc = new HtmlDocument(); 
doc.LoadHtml(downloadString); 
//string whatUrLookingFor = doc.GetElementbyId("syllabus-stages").InnerHtml; 
string whatUrLookingFor = doc.GetElementbyId("syllabus-stages").Attributes["data-url"].Value;