codeswitcher: A rainbow splash of paint exploding upward (Default)
codeswitcher ([personal profile] codeswitcher) wrote in [community profile] cs_hackerary2017-01-01 11:54 pm

How to use wget to fetch locked things on LJ and DW

h/t to [personal profile] antennapedia on LJ, "Making a local archive with wget"

You can use wget (if you have wget) to fetch pages off LJ and DW that you can only access logged in by this handy method:

1) Install the "Export Cookies" add-in to FireFox (presumably there are ways to pull this off with other browsers, but this is what I did.)

2) Log in to LJ or DW as appropriate.

3) Run "Export Cookies" and put the resultant cookie file somewhere you can find it.

4) Call wget like so:
wget --cookies=on --keep-session-cookies --save-cookies /path/to/newcookie.txt --load-cookies /path/to/ff_exported_cookes.txt --header "X-LJ-Auth: cookie" http://www.livejournal.com
substituting whatever url you want for "http://www.livejournal.com".

On DW, the "X-LJ-Auth" header field name still works, as does "X-DW-Auth".