2

I need to grab one webpage (single page, not all site) with all his assets(images/css) in command line.

I really like how google chrome do it - if I save webpage I get single html file and single directory with all assets. Moreover all paths to images are changed to local ones, and all links are absolute (if it was "/pricing", it becomes "http://example.com/pricing").

I know I can do it with wget, but I don't like the result - many directories (if there was images from different domains), and html file is somewhere in directory (with domain name)..

I really like the result after saving page with google chrome and I need to know if you know some command line crawlers which makes similar result.

Or you know how to configure wget to do it like I need?

2
  • Can you post file listings of the folders created by Chrome and Wget and point out the differences you need? Also, look into wget's --convert-links options, which converts "the links in the document to make them suitable for local viewing".
    – muru
    Dec 15, 2014 at 20:16
  • You may find the following bash script useful for what you need: github.com/abiyani/automate-save-page-as Dec 16, 2014 at 18:44

1 Answer 1

0

Thank you all for your suggestions!

What I need was --no-directories parameter to wget. Then I get one directory with all files I need (html file, images, css files).

Sorry, the question wasn't well formulated.

1
  • Note that --no-directories should be used with --recursive or some other recursive downloading options.
    – johnlinp
    Jul 20, 2021 at 0:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .