A C# Web Crawler

Here is a C# Web Crawler that could help you download web pages and attachments from one web-site. Such kind of crawler used vastly among some online stores during their beginning stage. They called them network spider, robot, crawler or radar.  They were trained well to retrieve only some kind of information that not like Google, Baidu does. They service their own small and special group of customizers.
crawler

The logic behind the web crawler is very easy: given by one url, the crawler will download this page, and parse and find all Urls. It repeat the whole process again for all those new found urls until all Urls were visited.  The full source code could be download from here.

 

Something need to fix
bugs 
This crawler could not work well when come across some web sites. I could access those web sites from the FireFox or other web browser. But it seems this crawler could not access those web server, error ‘<404> Not Found 'always report. If any one have some well work solutions, please let me know, thanks!  Maybe I could use external tools to download the web content instead of using native C# web API, may be I could use ‘wget’or something similar.


Reference
http://www.digitalcoding.com/Code-Snippets/C-Sharp/C-Code-Snippet-Download-HTML-Web-Page.html

转载于:https://www.cnblogs.com/open-coder/archive/2013/01/21/2870468.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值