简体   繁体   中英

How to download CGI page as a html with all the stuff (js, images, css and etc) using WGET?

When I use Google Chrome's "Save as.." the cgi page is being downloaded as one single html and another folder with all required stuff in order to display it correctly offline. I tried many parameter but nothing worked properly as I expected. Also -p doesn't work.

GNU Wget 1.14 built on linux-gnu. When I use -p option, get robots.txt and the .cgi file itself.

Can it be like this because of the cookies? Is there option that may fix this problem? Is there another way? I mean for example if I put some parameters to chromium in the terminal.

Quoting from the man page:

'-p' '--page-requisites'

This option causes Wget to download all the files that are necessary to properly display a given HTML page. This includes such things as inlined images, sounds, and referenced stylesheets.

Problem was that I needed to use cookies to pass the log in session. So --load-cookies seems to solve my problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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