Software Recommendations Stack Exchange is a question and answer site for people seeking specific software recommendations. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a webpage which contains lots of remote assets, like CSS and JavaScript files.

How can I download all the remote assets in a batch, rather than manually?

Is there any recommended tool to do this? Here's an example of a webpage:

  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
    <title>Memo</title>
    <link href="http://turbo.themezilla.com/memo/wp-content/themes/memo/style.css" media="screen" rel="stylesheet" type="text/css"></link>
    <link href="http://demo.themezilla.com/memo/feed/" rel="alternate" title="Memo RSS Feed" type="application/rss+xml"></link>
    <link href="http://demo.themezilla.com/memo/xmlrpc.php" rel="pingback"></link>
    <meta content="noindex,nofollow" name="robots"/>
    <link href="http://turbo.themezilla.com/memo/wp-content/plugins/zilla-shortcodes/shortcodes.css?ver=3.7.1" id="zilla-shortcodes-css" media="all" rel="stylesheet" type="text/css"></link>
    <link href="http://turbo.themezilla.com/memo/wp-content/plugins/zilla-dribbbler/css/zilla-dribbbler.css?ver=3.7.1" id="zilla-dribbbler-css" media="all" rel="stylesheet" type="text/css"></link>
    <link href="http://turbo.themezilla.com/memo/wp-content/plugins/zilla-likes/styles/zilla-likes.css?ver=3.7.1" id="zilla-likes-css" media="all" rel="stylesheet" type="text/css"></link>
    <link href="http://fonts.googleapis.com/css?family=Merriweather%3A700&ver=3.7.1" id="merriweather-css" media="screen" rel="stylesheet" type="text/css"></link>
    <script src="http://turbo.themezilla.com/memo/wp-includes/js/jquery/jquery.js?ver=1.10.2" type="text/javascript"></script>
    <script src="http://turbo.themezilla.com/memo/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1" type="text/javascript"></script>
    <script src="http://turbo.themezilla.com/memo/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.10.3" type="text/javascript"></script>
    <script src="http://turbo.themezilla.com/memo/wp-includes/js/jquery/ui/jquery.ui.widget.min.js?ver=1.10.3" type="text/javascript"></script>
    <script src="http://turbo.themezilla.com/memo/wp-includes/js/jquery/ui/jquery.ui.accordion.min.js?ver=1.10.3" type="text/javascript"></script>
    <script src="http://turbo.themezilla.com/memo/wp-includes/js/jquery/ui/jquery.ui.tabs.min.js?ver=1.10.3" type="text/javascript"></script>
    <script src="http://turbo.themezilla.com/memo/wp-content/plugins/zilla-shortcodes/js/zilla-shortcodes-lib.js?ver=3.7.1" type="text/javascript"></script>
    <script src="http://turbo.themezilla.com/memo/wp-content/plugins/zilla-likes/scripts/zilla-likes.js?ver=3.7.1" type="text/javascript"></script>
    <link href="http://demo.themezilla.com/memo/xmlrpc.php?rsd" rel="EditURI" title="RSD" type="application/rsd+xml"></link>
    <link href="http://turbo.themezilla.com/memo/wp-includes/wlwmanifest.xml" rel="wlwmanifest" type="application/wlwmanifest+xml"></link>
    <meta content="WordPress 3.7.1" name="generator"/>
share|improve this question
2  
What OS should this downloader run on? – Undo Jul 29 '14 at 2:31
up vote 3 down vote accepted

Httrack should be perfect for that.

  • very cross platform; Windows, Mac, Linux, and Android
  • free & open source
  • downloads html page and all resources to your computer. Optionally replacing any non-relative links with local links to the resources it downloads.
share|improve this answer

You can use GNU wget:

  • free and open source
  • Linux, Windows, Mac (brew install wget)
  • CLI

To download all remote assets js,css into local machine in a batch, you can use

wget --page-requisites http://turbo.themezilla.com/memo/
  • --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.
share|improve this answer

Bit late but for others searching for an idea to solve a similar problem (maybe you cannot open the page easily outside your browser, you cannot reload because of a form submit or whatever) - I simply used a little JavaScript in the browser's JS-Scratchpad and it's Console:

gregScrList = document.getElementsByTagName('script');
gregString = '';
for( i=0 ; i<gregScrList.length ; i++ ) {
  if( gregScrList[i]['src'] ) {
    gregString += gregScrList[i]['src'] + '\n';
  }
}
console.log(gregString);

(OK - this is a bit dirty but it was quick ...)

Save the output in a file and use any Download Manager or WGet to download them. Don't forget the Code in the page itself. For that you may use the code inspection and copy the inner HTML of or so ...

share|improve this answer
    
So, this is only a partial solution, right? – Nicolas Raoul Nov 18 '15 at 11:02

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.