简体   繁体   English

HtmlAgility.HtmlNodeCollection中的图像高度和宽度c#

[英]Image height and width in HtmlAgility.HtmlNodeCollection c#

I am downloading the whole site html tags and assigned it into HtmlAgility.HtmlNodeCollection c#. 我正在下载整个站点的html标记,并将其分配到HtmlAgility.HtmlNodeCollection c#中。 Now I am filtering only image src in Html. 现在我只过滤HTML中的image src。

This is my code: 这是我的代码:

string responseFromServer = string.Empty;
Uri url = new Uri(requestedURL);
using (WebClient wc = new WebClient())
{
    responseFromServer = wc.DownloadString(url);
}
HtmlDocument htmlDoc = new HtmlDocument();
htmlDoc.LoadHtml(responseFromServer);

So, is there any way to get image height and width or element height and width using HtmlNodeCollection class? 因此,有没有办法使用HtmlNodeCollection类获取图像的高度和宽度或元素的高度和宽度?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM