简体   繁体   English

如何获得HTML网页?

[英]how to get html web page?

I have to extract some information from html web page which contains the following table : 我必须从包含下表的html网页中提取一些信息:

//Http://www.example.com/12.html
//<html ... >
<table>
<tr>
<td>HIIIIIIIIIII</td> // this is what I need from this page
</tr>
<tr><td>bla bla bla</td></tr>
</table>

any Ideas ? 有任何想法吗 ?
Thank u 感谢你

You should have a look at the Html Agility Pack , which provides good ways of parsing/reading HTML (even badly formed) 您应该看一下Html Agility Pack ,它提供了解析/读取HTML(即使格式不正确)的好方法

On this SO question , you can find a sample of how to extract table data. 在这个SO问题上 ,您可以找到有关如何提取表数据的示例。 And this question contains sample of usage with LINQ. 这个问题包含LINQ用法示例。

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

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