Sunday, December 1, 2019

command line - Download a single web page (including images from CSS)

I want to download a single web page including everything needed to view the web page locally (this includes images linked in the css).



Example URL i want to download:



http://www.example.com/page1


The image are linked relatively in the css like this:




background: url(../img/example.jpg)


I have tried to download the page with Wget for Windows, but it doesn't download images from css or js files.



wget -E -H -k -K -p -e robots=off http://www.example.com/


The above solution from this answer also doesn-t work.




I also tried this method which explains how to extract URLs from the css with grep to an txt file, but my txt file is empty when I try.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...