The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Mixi::Scraper::Mech

SYNOPSIS

    use WWW::Mixi::Scraper::Mech;
    my $mech = WWW::Mixi::Scraper::Mech->new;
       $mech->login( 'foo@bar.com' => 'password' );

       $mech->may_have_errors('Cannot login');

    my $html = $mech->get_content('/new_friend_diary.pl');

    $mech->logout;
 

DESCRIPTION

Mainly used internally.

METHODS

new

creates an object. Optional hash is passed to WWW::Mechanize, except for 'email' and 'password' (and 'next_url'), which are used to login.

get

gets content of the uri.

content

returns (hopefully decoded) content.

get_content

As name suggests, this does both 'get' and 'content'. If you pass an additional encoding (which must be Encode-understandable), this returns encoded content.

login

tries to log in to mixi. As of writing this, password obfuscation and ssl login are not implemented.

logout

tries to log out from mixi.

may_have_errors

dies with error message and status code if something is wrong (this may change)

uri

shortcut for {mech}->uri.

SEE ALSO

WWW::Mechanize

AUTHOR

Kenichi Ishigaki, <ishigaki at cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2007 by Kenichi Ishigaki.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.