-
-
11 Jan 2011 19:16:00 UTC
- Distribution: LJ-GetCookieSession
- Module version: 0.01
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (697 / 0 / 0)
- Kwalitee
Bus factor: 0- 23.61% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (3.78KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Anastasiya Deeva
- Dependencies
- Digest::MD5
- Test::Exception
- Test::More
- WWW::Mechanize
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
LJ::GetCookieSession - A perl module to log into livejournal services
VERSION
Version 0.01
SYNOPSIS
LJ::GetSessionCookie
is anperl
module which is used to generate value of cookie parameter named 'ljsession', which can be used in future requests to lj services.Request mode sessiongenerate (see http://www.livejournal.com/doc/server/ljp.csp.flat.sessiongenerate.html) is used.
use LJ::GetSessionCookie; my $ljsession = LJ::GetCookieSession->generate({user=> ..., pass=>...});
http://www.livejournal.com/developer/protocol.bml
EXAMPLE
The following simple shows how to use the module to get all comments from LiveJournal.
use WWW::Mechanize; use LJ::GetCookieSession; my $mech = WWW::Mechanize->new( agent => 'support@creograf.ru', cookie_jar => { "ljsession" => "" } ); my $ljsession = LJ::GetCookieSession->generate({user=> ..., pass=>...}); die "failed to log into lj: ljsession failed\n" unless ( defined $ljsession ); $mech->add_header ('X-LJ-Auth' => "cookie"); $mech->add_header ('Cookie' => "ljsession=$ljsession"); $mech->get("http://livejournal.com/export_comments.bml?get=comment_body"); return undef unless ($mech->res->is_success); my $xml_comments = $mech->content();
LICENSE AND COPYRIGHT
Copyright 2011 Anastasiya Deeva, Studio Creograf http://creograf.ru, support@creograf.ru
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
AVAILABLE METHODS
LJ::GetSessionCookie::generate()
LJ::GetSessionCookie::generate()
is a routine which generates value of cookie 'ljsession' for LiveJournal.- user
-
The username who owns the journal; this option is required.
- pass
-
The password of the
user
; this option is required. - server
-
URL of remote site to login.
BUGS
Please report any bugs or feature requests to
bug-lj-getsessioncookie at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=LJ-GetSessionCookie. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORT
You can find documentation for this module with the perldoc command.
perldoc LJ::GetSessionCookie
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=LJ-GetSessionCookie
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
Module Install Instructions
To install LJ::GetCookieSession, copy and paste the appropriate command in to your terminal.
cpanm LJ::GetCookieSession
perl -MCPAN -e shell install LJ::GetCookieSession
For more information on module installation, please visit the detailed CPAN module installation guide.