3

I want to save web pages for offline reading. Currently I save it using firefox. For bulk saving I want to automate the process using a script (or what about a web site copier like webhttrack?). From terminal I can save the .html file of the URL (using wget URL) but can't view the page as no image, .js, etc.

Sometimes I want to save numbered pages, ie. https://askubuntu.com/posts/1, https://askubuntu.com/posts/2, https://askubuntu.com/posts/3, https://askubuntu.com/posts/4 .. (like mirroring) in one shot.

How can I bulk save web pages with all necessary file to view it properly?

2 Answers 2

5

There's a great little firefox addon called ScrapBook that'll do what you want. Just install it by clicking the Add to Firefox button on the addon's website over at Mozilla.

Here's the link

2
  • Can I change the file name of saved page to the tile of web page from YY:MM:DD ?
    – totti
    Commented Apr 10, 2013 at 6:41
  • What abt bulk saving ?
    – totti
    Commented Apr 10, 2013 at 6:57
3

You should use wget, but read the manual for the actual options you need.

Pay special attention to options like

‘-p’
‘--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.

or even

‘-m’
‘--mirror’
Turn on options suitable for mirroring. This option turns on recursion and time-stamping, sets infinite recursion depth and keeps ftp directory listings. It is currently > equivalent to ‘-r -N -l inf --no-remove-listing’.

Hell, check out, if you feel like it,

‘-k’
‘--convert-links’
After the download is complete, convert the links in the document to make them suitable for local viewing. This affects not only the visible hyperlinks, but any part of the document that links to external content, such as embedded images, links to style sheets, hyperlinks to non-html content, etc.

resulting in something like:

wget --mirror -p --convert-links -P ./LOCAL_PATH WWW.WEBSITE.TLD/PATH
1
  • Not helping, am I? Well, suit yourself then. Be sure to take a look at the documentation (I know right? reading) and search for "external". Play around with the -r and -l options. And please mention what you tried in your question instead of in snarky comments.
    – Nanne
    Commented Apr 10, 2013 at 8:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .