Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Is there a tool that allows me to point to a CSS URL, and recursively download the CSS, as well as all the image and @import urls referenced within it?

For example, if the CSS is at http://example.com/example.css

And it has things like background-image: url('images/bg.gif'), it should download bg.gif too, and dump it under an images/ subfolder locally. If it has a reference to another stylesheet ex2.css, it should recursively do this on ex2.css as well.

share|improve this question

2 Answers 2

This worked:

wget -rHm http://example.com/example.css 

But it won't work if you have a Windows wget (because GnuWin32's wget is at an older version that doesn't support CSS)

It works on fedora after you upgrade wget to the latest using

yum update wget

Link:

http://wget.addictivecode.org/FrequentlyAskedQuestions#Can_Wget_download_links_found_in_CSS.3F

share|improve this answer

Use Jdownloader http://jdownloader.org/ it is an open source program.

You can command/ctrl+a then copy the CSS file and paste it into the parse URL place in that program and it will automatically download every thing linked from the CSS.

May be before you do that you will replace stuff like images/myimage.jpg with http://www.example.com/images/myimage.jpg

Just find and replace all.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.