11 $SIG{ __DIE__ } = sub { Carp::confess( @_ ) };
17 getter => 'filegetter',
18 'plugin.youtube.QUALITY' => 'hd',
19 'plugin.youtube.ADAPTIVE' => 1,
20 'plugin.filegetter.FILEPATTERN' => './%3$s.flv',
27 foreach (keys(%{$m})) {
28 printf("%s: %s\n", $_, defined($m->{$_})?$m->{$_}:'(undef)');
32 print("Downloading $m->{'TITLE'}\n");
38 GetOptions("i" => \$info, "d" => \$debug);
40 push(@INC, dirname(realpath($0)));
43 unless(libvideosite::register_api({
44 link_callback => \&link_callback,
45 _config_default => sub { return \%config },
46 _debug => sub { return $debug },
48 die("Error registering API: $libvideosite::error");
51 unless(libvideosite::init()) {
52 die("Could not init libvideosite: $libvideosite::error");
56 printf("Handling %s...\n", $_);
57 libvideosite::check_for_link({
59 io => sub { print @_, "\n" },