fork download
  1. #!/usr/bin/env perl
  2. use 5.010;
  3. use strict;
  4. use warnings;
  5. use utf8;
  6. #binmode STDOUT, ":utf8";
  7.  
  8. use URI;
  9. use Web::Scraper;
  10. use Excel::Writer::XLSX;
  11. use LWP::UserAgent;
  12.  
  13. use Mojo::UserAgent;
  14. use WWW::YouTube::Download;
  15. use WebService::GData::YouTube;
  16.  
  17.  
  18. my ($search, $limit) = (@ARGV);
  19. $limit //= 10;
  20.  
  21.  
  22. my $search_youtube = WebService::GData::YouTube->new;
  23.  
  24.  
  25. $search_youtube->query()->q($search)->limit($limit, 0);
  26.  
  27.  
  28. my $results = $search_youtube->search_video();
  29.  
  30.  
  31. my $client = WWW::YouTube::Download->new;
  32. foreach my $ret (@$results) {
  33. say "Starting Download : " . $ret->title;
  34. $client->download($ret->video_id);
  35. }
  36.  
Runtime error #stdin #stdout #stderr 1.52s 194112KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
===SORRY!===
Could not find strict in any of: /usr/lib/parrot/6.6.0/languages/perl6/lib, /usr/lib/parrot/6.6.0/languages/perl6