Log in

No account? Create an account
Hello, I need to do a few bash/gawk scripts to have some basic… - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Nov. 2nd, 2006|07:27 am]
LiveJournal Client Discussions


Hello, I need to do a few bash/gawk scripts to have some basic automation for day-to-day tasks. Some of them require a login.

Is there a way to have a simple authentication, without having to mimic the behavior of the browser?

[User Picture]From: tymofiy
2006-11-02 04:35 pm (UTC)


I tried, I really tried... Just can't resist the temptation to post that "one-liner"...

print xmlrpclib.Server("http://www.livejournal.com/interface/xmlrpc:80").LJ.XMLRPC.getevents({'username': 'myusername', 'hpassword': md5.md5('mypasswd').hexdigest(), 'ver': '1','lineendings': '0x0A', "selecttype": "lastn", "itemid": -1, "howmany": 1 })['events'][0]['subject']

but you got to have really big screen to avoid line wraps
(Reply) (Parent) (Thread)
[User Picture]From: vanbeast
2006-11-02 04:43 pm (UTC)

Re: One-liner


I come from perl, so I know that style. I love it.
(Reply) (Parent) (Thread)
[User Picture]From: ralesk
2006-11-02 06:57 pm (UTC)

Re: One-liner

Hahaha, yes! That tickled the Perlist in me too :D

(Reply) (Parent) (Thread)