我有一个html页面,但我不能得到iframe src的值。 这是我的代码
string requestUrl = URL.Text;
WebRequest request = WebRequest.Create(requestUrl);
WebResponse response = request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string responseText = reader.ReadToEnd();
doc.LoadHtml(responseText);
var content = doc.DocumentNode.SelectNodes("//iframe[@class='ifram']//iframe");
var src= content.Select(x => x.Attributes["src"]);