Skip to content

Instantly share code, notes, and snippets.

@arran4
Last active August 2, 2020 06:03
Show Gist options
  • Save arran4/fbe781f6ddc4dea12ac5fc0d1cb49952 to your computer and use it in GitHub Desktop.
Save arran4/fbe781f6ddc4dea12ac5fc0d1cb49952 to your computer and use it in GitHub Desktop.
You will have to get your cookie string.. The easiest way I have done is simply to use the chrome developer tools networking tab and turn on "preserve data" then copy the whole "cookie" section.
Don't forget to set $JOURNAL, $COOKIES
for year in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20; do for month in 1 2 3 4 5 6 7 8 9 10 11 12; do echo "Getting $year $month"; curl -X POST 'https://www.livejournal.com/export_do.bml?authas=$JOURNAL' -d 'what=journal' -d "year=20$year" -d "month=$month" -d 'format=xml' -d 'header=Yes' -d 'encid=2' -d 'notranslation=No' -d 'field_itemid=Yes' -d 'field_eventtime=Yes' -d 'field_logtime=Yes' -d 'field_subject=Yes' -d 'field_event=Yes' -d 'field_security=Yes' -d 'field_allowmask=Yes' -d 'field_currents=Yes' --cookie $COOKIES -i > content-$year-$month.xml; done; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment