WWW::YouTube::Download(3pm) | User Contributed Perl Documentation | WWW::YouTube::Download(3pm) |
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 library to download videos from YouTube. It relies entirely on scraping a video's webpage and does not use YT's /get_video_info URL space.
$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.
Allowed arguments:
"filename" supported format placeholders:
{video_id} {title} {user} {fmt} {suffix} {resolution}
Output filename is set to "{video_id}.{suffix}" by default.
$client->playback_url($video_id); $client->playback_url($video_id, { fmt => 37 });
Return playback URL of the video. This is direct link to the movie file. Function supports only "fmt" option.
The "video_url_map" has one key/value pair for each available format, where the key is the format identifier (can be used as "fmt" parameter for "download", for example) and the value is a hash reference with the following data:
$self->ua->agent(); $self->ua($LWP_LIKE_OBJECT);
Sets and gets LWP::UserAgent object.
xaicron <xaicron {@} cpan.org>
yusukebe
Plese use github issues: <https://github.com/xaicron/p5-www-youtube-download/issues>.
WWW::YouTube::Info and WWW::YouTube::Info::Simple. WWW::NicoVideo::Download <http://rg3.github.io/youtube-dl/>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2018-07-23 | perl v5.26.2 |