The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::YouTube::Download - Very simply YouTube video download interface.

SYNOPSIS

  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.

DESCRIPTION

WWW::YouTube::Download is a download video from YouTube.

METHODS

new()
  $client = WWW::YouTube::Download->new;

Creates a WWW::YouTube::Donwload instance.

download($video_id [, \%args])
  $client->download($video_id);
  $client->download($video_id, {
      fmt       => 37,
      file_name => 'sample.mp4', # save file name
  });
  $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'.

ua([$ua])
  $self->ua->agent();
  $self->ua($LWP_LIKE_OBJECT);

Sets and gets LWP::UserAgent object.

get_video_url($video_id)
get_title($video_id)
get_fmt($video_id)
get_fmt_list($video_id)
get_suffix($video_id)

AUTHOR

Yuji Shimada

CONTRIBUTORS

yusukebe

SEE ALSO

WWW::NicoVideo::Download

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.