Contributed by: Jeremy Tribby
Embedding your LiveJournal is easy with Python; just use the urllib class.
Note: using a scripting language to embed your journal is considered an "advanced" method; this tutorial assumes you have some prior experience in using this language. If you need assistance with creating a script, please consult the Python documentation or your web host's technical support.
S1
<%
import urllib
u = urllib.urlopen('http://exampleusername.livejournal.com/data/customview?styleid=style ID')
print 'Content-type: text/html\n\n'
print u.read()
%>
S2
<%
import urllib
u = urllib.urlopen('http://exampleusername.livejournal.com/?s2id=S2 ID')
print 'Content-type: text/html\n\n'
print u.read()
%>
S1: You will need to replace style ID with the actual style ID for the style you wish to use. LiveJournal provides some basic example styles with the IDs 101 and 408. These styles are very basic, however, and cannot be easily customized. In order to use these styles, you will need to set them trusted. See the "
Guide to customview" for more information.
S2: You will need to replace S2 ID with the actual S2 style ID for the style you wish to use. Please note that it must be a style ID; layout layer IDs will not work. The S2 style IDs are listed on
Your Styles page.
Free users cannot use customview or S2 IDs. In order to embed your journal as a free user, replace the entire URL for either example with their basic journal URL: http://exampleusername.livejournal.com/.