WWW::Mixi::Scraper::Mech - WWW::Mixi::Scraper::Mech documentation


WWW-Mixi-Scraper documentation  | view source Contained in the WWW-Mixi-Scraper distribution.

Index


NAME

Top

WWW::Mixi::Scraper::Mech

SYNOPSIS

Top

    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

Top

Mainly used internally.

METHODS

Top

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

Top

WWW::Mechanize

AUTHOR

Top

Kenichi Ishigaki, <ishigaki at cpan.org>

COPYRIGHT AND LICENSE

Top


WWW-Mixi-Scraper documentation  | view source Contained in the WWW-Mixi-Scraper distribution.