Skip to content

Instantly share code, notes, and snippets.

@punytan
Created November 4, 2010 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save punytan/662805 to your computer and use it in GitHub Desktop.
Save punytan/662805 to your computer and use it in GitHub Desktop.
download leaked videos
use strict;
use warnings;
use WWW::YouTube::Download;
use Parallel::ForkManager;
my $urls = [qw{
JXkawnuyTn8
bY0tgl6YLGI
3eJsXP4HLVs
gOUvdNjs_Cg
q3JYT0G94-E
A7h0S1nk9Hk
}];
my $pm = Parallel::ForkManager->new(scalar @$urls);
for my $url (@$urls) {
my $pid = $pm->start and next;
my $client = WWW::YouTube::Download->new(verbose => 1);
$client->download($url);
$pm->finish;
}
$pm->wait_all_children;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment