?

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

lj_clients

[mikhailian]
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?
linkReply

Comments:
[User Picture]From: ralesk
2006-11-02 07:05 pm (UTC)

Re: and indeed,

I actually used that as an example to do Cookie auth in Python and it’s perfectly WfM here.

__h = httplib.HTTPConnection(self.site, self.port)
__h.request("POST", self.interface, __req, {'X-LJ-Auth': 'cookie', 'Cookie': 'ljsession='+self.getSession()})

Also, question: did you urlencode the cookie in case it’s stored urldecoded? and did you set auth_method=cookie?

(Reply) (Parent) (Thread)