Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How can I fetch a web page with external resources like browsers "save complete web page"?

How can I fetch a web page with external resources like browsers "save complete web page"?

Problem

How can I save a web page with External Resources like browsers' "save complete web page" but from command line or with node?

That is executing command /uri/of/page.html saves all js and css files referenced in page.html.

Problem courtesy of: Ali Shakiba

Solution

You can use wget and its recursive download ability.

http://www.gnu.org/software/wget/manual/wget.html#Recursive-Download

$ wget -r

or

$ wget --page-requisites
Solution courtesy of: The Reddest

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

How can I fetch a web page with external resources like browsers "save complete web page"?

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×