Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save a public html page with all media and preserve structure

Looking for a Linux application (or Firefox extension) that will allow me to scrape an HTML mockup and keep the page's integrity.

Firefox does an almost perfect job but doesn't grab images referenced in the CSS.

The Scrapbook extension for Firefox gets everything, but flattens the directory structure.

I wouldn't terribly mind if all folders became children of the index page.

like image 724
Adam Avatar asked Sep 17 '08 03:09

Adam


3 Answers

See Website Mirroring With wget

wget --mirror –w 2 –p --HTML-extension –-convert-links http://www.yourdomain.com
like image 178
Gilean Avatar answered Oct 19 '22 19:10

Gilean


Have you tried wget?

like image 35
etchasketch Avatar answered Oct 19 '22 17:10

etchasketch


wget -r does what you want, and if not, there are plenty of flags to configure it. See man wget.

Another option is curl, which is even more powerful. See http://curl.haxx.se/.

like image 1
Thomas Avatar answered Oct 19 '22 17:10

Thomas