Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

www::nicovideo::download(3pm) [debian man page]

WWW::NicoVideo::Download(3pm)				User Contributed Perl Documentation			     WWW::NicoVideo::Download(3pm)

NAME
WWW::NicoVideo::Download - Download FLV/MP4/SWF files from nicovideo.jp SYNOPSIS
use WWW::NicoVideo::Download; my $client = WWW::NicoVideo::Download->new( email => 'your-email@example.com', password => 'PASSWORD', ); $client->download("smNNNNNN", &callback); DESCRIPTION
WWW::NicoVideo::Download is a module to login, request and download video files from Nico Nico Douga. METHODS
new $client = WWW::NicoVideo::Download->new(%options); Creates a new WWW::NicoVideo::Download instance. %options can take the following parameters and they can also be set and get using accessor methods. email, password Sets and gets email and password to login Nico Nico Douga. Required if the User Agent object doesn't have the valid session or cookie to login to the site. user_agent Sets and gets LWP::UserAgent object to use to send HTTP requests to nicovideo.jp server. If you want to reuse the browser Cookie that has the signed-in state, you can set the Cookie to the UserAgent object here. # use Safari sesssions use HTTP::Cookies::Safari; my $cookie_jar = HTTP::Cookies::Safari->new( file => "$ENV{HOME}/Library/Cookies/Cookies.plist", ); my $client = WWW::NicoVideo::Download->new; $client->user_agent->cookie_jar( $cookie_jar ); download $client->download($video_id, $file_path); Prepares the download by logging in and requesting the FLV API, and then download the video file. The second parameter is passed to LWP::UserAgent's request() method, so you can pass either local file path to be saved, or a callback function. prepare_download my $url = $client->prepare_download($video_id); Prepares the download and returns the URL of the actual video. See eg/fetch-video.pl how to make use of this method. AUTHOR
Tatsuhiko Miyagawa <miyagawa@cpan.org> Original download code for Plagger was written by Yusuke Wada and the command line tool written by woremacx. LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
perl v5.10.1 2010-03-26 WWW::NicoVideo::Download(3pm)

Check Out this Related Man Page

WWW::Mechanize::FormFiller::Value::Callback(3pm)	User Contributed Perl Documentation	  WWW::Mechanize::FormFiller::Value::Callback(3pm)

NAME
WWW::Mechanize::FormFiller::Value::Callback - Call Perl code to fill out a HTML form field SYNOPSIS
use WWW::Mechanize::FormFiller; use WWW::Mechanize::FormFiller::Value::Callback; my $f = WWW::Mechanize::FormFiller->new(); # Create a default value for the HTML field "login" # This will put the current login name into the login field sub find_login { getlogin || getpwuid($<) || "Kilroy"; }; my $login = WWW::Mechanize::FormFiller::Value::Callback->new( login => &find_login ); $f->add_value( login => $login ); # Alternatively take the following shorthand, which adds the # field to the list as well : # "If there is no password, put a nice number there my $password = $f->add_filler( password => Callback => sub { int rand(90) + 10 } ); DESCRIPTION
This class provides a way to write a value returned by Perl code into a HTML field. new NAME, CODE Creates a new value which will correspond to the HTML field "NAME". The "CODE" is a code reference that will return the value to be written into the HTML field. The code reference will be called with two parameters, the object and the HTML::Form::Input object. name [NEWNAME] Gets and sets the name of the HTML field this value corresponds to. value FIELD Returns the value to put into the HTML field. EXPORT None by default. COPYRIGHT AND LICENSE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Copyright (C) 2002,2003 Max Maischein AUTHOR
Max Maischein, <corion@cpan.org> Please contact me if you find bugs or otherwise improve the module. More tests are also very welcome ! SEE ALSO
WWW::Mechanize, WWW::Mechanize::Shell, WWW::Mechanize::FormFiller, WWW::Mechanize::FormFiller::Value::Value, WWW::Mechanize::FormFiller::Value::Default, WWW::Mechanize::FormFiller::Value::Random, WWW::Mechanize::FormFiller::Value::Interactive perl v5.10.1 2009-04-24 WWW::Mechanize::FormFiller::Value::Callback(3pm)
Man Page