C#提取页面结果 [英] c# extract page results
本文介绍了C#提取页面结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮助
如何使用c#提取数据
如何从下面的网站中提取前10页结果
http://www.gutefrage.net/suche?q=fenster&ie=UTF-8
谢谢
please help
how to extract data with c#
how to extract first 10 page results from below website
http://www.gutefrage.net/suche?q=fenster&ie=UTF-8
thank you
推荐答案
您需要的是网页抓取:
http://en.wikipedia.org/wiki/Web_scraping [ http://msdn.microsoft.com/en-us/library/system.net. webclient.aspx [^ ],
http://msdn.microsoft.com/en-us/library/system.net. httpwebrequest.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.net. webresponse.aspx [ ^ ].
有关简单的代码示例,请参见:
http://msdn.microsoft.com/en-us/library/system.net. webrequest.aspx [ ^ ].
另请参阅我过去对相关问题的回答:
如何从另一个站点获取数据 [ ^ ],
从网页中获取特定数据 [
What you need is called web scraping:
http://en.wikipedia.org/wiki/Web_scraping[^].
You need to use eitherSystem.Net.WebClient
(for simplest cases) orSystem.Net.HttpWebRequest
withSystem.Net.WebResponse
, in a general case. Please see:
http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.webresponse.aspx[^].
For a simple code sample, please see:
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^].
See also my past answers to related questions:
How to get the data from another site[^],
get specific data from web page[^].
—SA
这篇关于C#提取页面结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文