wget 下载 aspx 页面

发布于 2024-11-14 22:54:47 字数 366 浏览 5 评论 0原文

我想下载网页 http://www.codeproject.com/KB/tips/ ModelViewController.aspx 使用 wget,所以我只使用了非常基本的命令:

wget http://www.codeproject.com/KB/tips/ModelViewController.aspx

我收到的是一个文件.aspx 扩展名,无法在常规浏览器中正确显示。

我怎样才能下载该网页?

I want to download the web page http://www.codeproject.com/KB/tips/ModelViewController.aspx using wget, so I simply used the really basic command:

wget http://www.codeproject.com/KB/tips/ModelViewController.aspx

What I received was a file with the .aspx extension, which could not be displayed correctly in a regular browser.

How can I download that web page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

-柠檬树下少年和吉他 2024-11-21 22:54:47

感谢 wget 手册页(第一个结果网络搜索“wget options”,顺便说一句):

wget -E http://whatever.url.example.com/x/y/z/foo.aspx

如果您还希望下载所有相关媒体(CSS、图像等),请使用 -p,也可能与 --convert-links 一起使用(重写离线查看页面):

wget -Ep --convert-links http://whatever.url.example.com/x/y/z/foo.aspx

Courtesy of the wget manual page (first result of a web search on "wget options", btw):

wget -E http://whatever.url.example.com/x/y/z/foo.aspx

If you also wish to download all related media (CSS, images, etc.), use -p, possibly with --convert-links (rewrites the page for offline viewing):

wget -Ep --convert-links http://whatever.url.example.com/x/y/z/foo.aspx
望笑 2024-11-21 22:54:47

该文件实际上会正确显示,您可以将其重命名为 .html 文件,然后您就可以确认这一点。网络服务器使用的服务器端技术不会影响 wget

编辑:我下面的评论是错误的,感谢评论者指出,已将其删除以供未来的读者使用

The file will actually be displaying correctly, you can rename it to a .html file and you will be able to confirm this. The server-side technology used by the webserver doesn't effect wget

Edit: my comments below this were wrong, thanks for the commentor for pointing it out, have removed them for future readers

睫毛溺水了 2024-11-21 22:54:47
$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains example.org \
     --no-parent \
         www.example.org/tutorials/html/

从这个页面: http://www.linuxjournal.com/content/downloading -整个网站-wget

$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains example.org \
     --no-parent \
         www.example.org/tutorials/html/

from this page : http://www.linuxjournal.com/content/downloading-entire-web-site-wget

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文