WWW::NicoVideo - Perl interface to Nico Nico Video service
use utf8; use WWW::NicoVideo; binmode STDOUT, ":encoding(euc-jp)"; my $nv = new WWW::NicoVideo(mail => 'ritsuko@ritsuko.org', passwd => "ritchan-wa-kawaiidesuyo"); $nv->login or die "Login failed"; my @entries = $nv->getEntriesByTagNames("律子ソロ") or die "get failed"; foreach my $e (@entries) { print $e->title, "\n"; }
This module allows you to get information from Nico Nico Video service (http://www.nicovideo.jp/) and also allows you to search from it.
Constructs a new WWW::NicoVideo object and returns it. Key/value pair options may be provided to set the default value. Following options are accepted:
LWP::UserAgent / HTTP::Cookies object.
Retry count / retry interval in second. As Nico Nico Video rejects mass access, you have to give appropriate interval between accesses.
Mail address / password to access Nico Nico Video.
All options except "cookies" can be accessed via accessor methods. (e.g. $nv->agent) You may access cookies via "agent". (e.g. $nv->agent->cookie_jar)
Login to Nico Nico Video. You have to call this method before calling getEntries* methods;
Returns entry list for given tag name(s) / keyword(s). In scalar context, this method returns a reference to array of WWW::NicoVideo::Entry or undef on errors. In list context, this method returns list of WWW::NicoVideo::Entry or null list on errors. Following options are accepted:
Tagname(s) or keyword(s). "key" takes a scalar value, "keys" takes a reference to array.
Page number.
Sort type. "f" for post date, "v" for number of views, "r" for number of comments, undef for last comment date.
Sort order. "a" for ASC, "d" or undef for DESC.
perl(1), Web::Scraper, WWW::NicoVideo::Entry
HIRATA Yasuyuki, <yasu@REMOVE-THIS-PART.asuka.net>
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.
The latest version of this module is available from our Subversion repository at: http://svn.coderepos.org/share/lang/perl/WWW-NicoVideo/
To install WWW::NicoVideo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::NicoVideo
CPAN shell
perl -MCPAN -e shell install WWW::NicoVideo
For more information on module installation, please visit the detailed CPAN module installation guide.