NAME
WWW::NicoSound::Download - Get mp3 file from NicoSound
SYNOPSIS
use WWW::NicoSound::Download qw( get_id save_mp3 get_raw get_ids );
my $url = "http://nicosound.anyap.info/sm0000000";
my $id = get_id( $url );
save_mp3( $id ); # Using original name.
save_mp3( $id, "filename.mp3" ); # This uses specified name.
# Use following method if you want to modify MP3 data.
my $raw_ref = get_raw( $id );
# ..some modification.
# Get MP3 from a local-file of web-page.
my @ids = get_ids( "somepage.html" );
save_mp3( $_ )
for @ids;
# To see module messages, set flag to true.
$WWW::NicoSound::Download::IS_RIOT = 1;
DESCRIPTION
In this module, you can preserve a file from NicoSound's mp3.
NicoSound's URL is "http://nicosound.anyap.info/".
EXPORT
None by default.
- get_id( "http://nicosound.anyap.info/sm0000000" )
-
This function parses URL and returns ID.
- get_raw( "nm0000000" )
-
This function reads the MP3 data to the memory. It is used to raw modification. Use save_mp3 if only saving MP3 data.
- save_mp3( "nm0000000" )
-
This function preserves MP3 data to file. And returns filename that was preserved.
Second parameter is filename. If it is not defined, this function try to get original name. But could not, preserve as "<process ID>.<number>.mp3".
- get_ids( "webpage.html" )
-
This function obtains some ID from web page. Web page is a HTML file that from NicoSound.
SEE ALSO
AUTHOR
Kuniyoshi Kouji, <Kuniyoshi.Kouji@indigo.plala.or.jp>
COPYRIGHT AND LICENSE
Copyright (C) 2009 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.