NAME

WWW::Scraper::Yahoo360 - Yahoo 360 blogs old-fashioned crappy scraper

SYNOPSIS

use WWW::Scraper::Yahoo360;

my $y360 = WWW::Scraper::Yahoo360->new({
    username => 'myusername',
    password => 'mypassword',
});

# High level blog information
my $blog_info = $y360->blog_info();

# Gets all the blog posts
my $posts     = $y360->get_blog_posts();

# Gets all the blog post comments
my $comments  = $y360->get_blog_comments();

DESCRIPTION

Ignorant web scraper, based on WWW::Mechanize, that connects to your Yahoo 360 account and tries to fetch the blog posts and comments you still have on their service.

If it breaks, well... it's a scraper.

This module is used on the My Opera Community, http://my.opera.com, to import Yahoo 360 existing blogs into My Opera blog service.

SUBROUTINES

new(\%args)

Where \%args is a hashref with username and password of your Yahoo 360 account.

This creates a new WWW::Scraper::Yahoo360 object, ready to scrape.

blog_info()

Fetches high-level blog information for your Yahoo 360 blog. Returns a hashref with the some/all the following information:

Something like: http://blog.360.yahoo.com/blog-<yourusername>

sharing

Most probably public. Could also be friends or friends of friends, but never tried it.

count

Number of blog posts in total.

start

First blog post on the frontpage. Should be 1.

end

Last blog post on the frontpage, usually 5.

title

Title of the blog.

blog_main_page()

Fetches the user's main blog page. Returns a string with the HTML page contents.

blog_page_url($link, $start, $per_page, $count)

Builds the url to fetch a specific blog page.

login()

Logs in to Yahoo service.

dump()

Dumps last accessed page content to STDOUT

get_blog_comments(\@posts)

Retrieves all comments in the user's blog. Wants the structure returned by get_blog_posts().

get_blogpost_comments($post)

Retrieves all comments to a single blog post. Wants a single $post entry (hashref): one of the elements returned by get_blog_posts().

get_blog_posts()

Gets all blog posts by a user. Returns an array of hashrefs, each one representing a blog post.

mech()

WWW::Mechanize object accessor.

parse_date($date_string)

Tries to parse a date from the Yahoo 360 format to a unix timestamp.

EXPORTS

None by default.

AUTHOR

Cosimo Streppone, <cosimo@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Cosimo Streppone, cosimo@cpan.org

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.