WWW::YouTube::Download - Very simple YouTube video download interface
use WWW::YouTube::Download; my $client = WWW::YouTube::Download->new; $client->download($video_id); my $video_url = $client->get_video_url($video_id); my $title = $client->get_title($video_id); # maybe encoded utf8 string. my $fmt = $client->get_fmt($video_id); # maybe highest quality. my $suffix = $client->get_suffix($video_id); # maybe highest quality file suffix
WWW::YouTube::Download is a download video from YouTube.
$client = WWW::YouTube::Download->new;
Creates a WWW::YouTube::Download instance.
$client->download($video_id); $client->download($video_id, { fmt => 37, filename => 'sample.mp4', # save file name }); $client->download($video_id, { filename => '{title}.{suffix}', # maybe `video_title.mp4` }); $client->download($video_id, { cb => \&callback, });
Download the video file. The first parameter is passed to YouTube video url. \&callback details SEE ALSO LWP::UserAgent ':content_cb'.
file_name is DEPRECATED!!
file_name
filename supported format:
filename
{video_id} {title} {fmt} {suffix} {resolution}
$self->ua->agent(); $self->ua($LWP_LIKE_OBJECT);
Sets and gets LWP::UserAgent object.
Yuji Shimada
yusukebe
WWW::NicoVideo::Download
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install WWW::YouTube::Download, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::YouTube::Download
CPAN shell
perl -MCPAN -e shell install WWW::YouTube::Download
For more information on module installation, please visit the detailed CPAN module installation guide.