我正在使用WebClient [c#]
WebClient client = new WebClient();
client.Encoding = Encoding.UTF8;
var response = client.DownloadString("http://www.iryoucai.com/PositionDefault_069.html");
var doc = new HtmlDocument();
HtmlDocumentExtensions.LoadHtml2(doc, response);
var docNode = doc.DocumentNode;
var emailNode = docNode.QuerySelector("#positionEamil");//this is a span with display=none, actually contains c-hr@cg.com.cn
Console.WriteLine(emailNode.InnerText);// output ' '
和Fizzler抓取某个域中的某些网页;但是一个烫手山芋到我手中:如果html源代码包含一个显示样式为none的标签,那么我不会得到该标签的内容/文本,任何想法?提前谢谢!