Sam Wilson's Journal

NewsArchives

 «   »

The combination of wget and the Export Cookies add-on for Firefox is useful for creating offline, complete, static archives of websites that are only accessible with a password:

  1. First log in to the site and export cookies.txt,
  2. Then run
    wget \
    	--recursive \
    	--no-clobber \
    	--page-requisites \
    	--html-extension \
    	--convert-links \
    	--restrict-file-names=windows \
    	--domains example.com \
    	--no-parent \
    	--load-cookies cookies.txt \
    	--reject logout,admin* \
    	example.com/sub/dir
    

The rejection of logout URLs is especially useful, because otherwise one will probably be logged out by wget accessing the logout link.

[Keywords: , , , , , , ] [No comments] [Permanent link]

Comments:

  1. Leave a comment:

    You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

« »