user3577807
user3577807

Reputation: 31

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.

Upvotes: 0

Views: 372

Answers (2)

user3577807
user3577807

Reputation: 31

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

Upvotes: 0

Frans van Buul
Frans van Buul

Reputation: 3289

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.

Upvotes: 1

Related Questions