[v_act] 爬虫,采集必备神器[/v_act]
1 2 3 4 5 6 |
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); //html是获得网页的内容 doc.LoadHtml(html); //xpath 是获取规则 HtmlAgilityPack.HtmlNode node = doc.DocumentNode.SelectSingleNode(xpath); videoid = node.Attributes["tt-videoid"].Value; |
发表评论
要发表评论,您必须先登录。