Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

mpenkov/lj-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

lj-download

This script downloads LiveJournal articles and saves them as HTML-formatted Jekyll posts. Given the URL of the most recent entry in a journal, the script iteratively fetches entries until it gets to the oldest entry. For each entry, it extracts the entry title, update time, tags and actual entry content by using Xpath queries. If LJ changes the page layout significantly in the future, then these queries may no longer work.

Pre-requisites

  • requests - for downloading the HTML
  • lxml - for parsing the HTML
  • beautifulsoup4 - for pretty-printing the HTML (I couldn't get lxml to do this for me)
  • unidecode - for transliteration of the title (you don't need this if your blog is in English)

You can download all of the above packages from https://pypi.python.org/pypi.

Running

./main.py http://kogumamisha.livejournal.com/20145.html

This will download my Russian-language blog into the html subdirectory.

About

Download a LiveJournal blog

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages