11 $SIG{ __DIE__ } = sub { Carp::confess( @_ ) };
17 getter => 'filegetter',
18 'plugin.youtube.QUALITY' => 'hd',
19 '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, "o=s" => \@options);
39 %config = (%config, map { split(/=/, $_, 2) } @options);
41 push(@INC, dirname(realpath($0)));
44 unless(libvideosite::register_api({
45 link_callback => \&link_callback,
46 _config_default => sub { return \%config },
47 _debug => sub { return $debug },
49 die("Error registering API: $libvideosite::error");
52 unless(libvideosite::init()) {
53 die("Could not init libvideosite: $libvideosite::error");
57 printf("Handling %s...\n", $_);
58 libvideosite::check_for_link({
60 io => sub { print @_, "\n" },