NAME

WWW::NicoSound::Download - Save MP3 file from nicosound

SYNOPSIS

use WWW::NicoSound::Download;

my $url = "http://nicosound.anyap.info/sound/smXXXXXXXX";

my $downloader = WWW::NicoSound::Download->new;

my $sound = $downloader->save( url => $url );

print $sound->filename, "\n";

use Path::Class qw( file );
use HTML::SimpleLinkExtor;

my $extor = HTML::SimpleLinkExtorj->new;
my $html  = do {
    my $raw = file( "result_page_of_searching_from_nicosound.html" )->slurp;
    utf8::decode( $raw );
    $raw;
};
my @urls = do {
    $extor->parse( $raw );
    $extor->links;
};
my @ids = map { WWW::NicoSound::Download->url_to_id( $_ ) } @urls;

DESCRIPTION

This class is for downloading MP3 files from nicosound web service.

CLASS METHODS

new

Returns a new instance of Downloader.

url_to_id

Parses and returns nicosound ID from url.

INSTANCE METHODS

save

Downloads a MP3 from nicosound, and returns instance of WWW::NicoSound::Download::Sound.

PROPERTIES

ua

Specifies a LWP::UserAgent's instance.

is_riot

is specified, report message what i'm doing.

debug

Tells me work strictry.

SEE ALSO

The homepage URL of NicoSound is "http://nicosound.anyap.info/"

COPYRIGHT AND LICENSE

Copyright (C) 2010 by Kuniyoshi Kouji

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