下载在C#中的整个网站 [英] Download an Entire Website in C#

查看:196
本文介绍了下载在C#中的整个网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

原谅关于这个问题我的无知

Forgive my ignorance on the subject

我使用

 string p="http://" + Textbox2.text;
 string r= textBox3.Text;
 System.Net.WebClient webclient=new
 System.Net.Webclient();
 webclient.DownloadFile(p,r);

下载网页。能否请您帮助我提高了代码,以便它下载整个网站。使用HTML屏幕抓取,但它返回我的只有中的index.html文件的href链接尝试。我该如何继续前进

to download a webpage. Can you please help me with enhancing the code so that it downloads the entire website. Tried using HTML Screen Scraping but it returns me only the href links of the index.html files. How do i proceed ahead

感谢

推荐答案

刮网站其实很多工作,有很多的角落案件。

Scraping a website is actually a lot of work, with a lot of corner cases.

调用的 wget的代替。该手动解释了如何使用的递归检索的选项。

Invoke wget instead. The manual explains how to use the "recursive retrieval" options.

这篇关于下载在C#中的整个网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆