App-YoutubeDlIfNotYet

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


VERSION
    This document describes version 0.003 of App::YoutubeDlIfNotYet (from
    Perl distribution App-YoutubeDlIfNotYet), released on 2020-04-05.

DEPRECATION NOTICE
    Superseded by youtube-dl-if (from App::YoutubeDlIf).

DESCRIPTION
FUNCTIONS
  youtube_dl_if_not_yet
    Usage:

     youtube_dl_if_not_yet(%args) -> [status, msg, payload, meta]

    (DEPRECATED) Download videos using youtube-dl only if videos have not
    been donwnloaded yet.

    This is a wrapper for youtube-dl; it tries to extract downloaded video
    ID's from filenames or URL's or video ID's listed in a text file, e.g.:

     35682594        Table Tennis Shots- If Were Not Filmed, Nobody Would Believe [HD]-dUjxqFbWzQo.mp4       date:[2019-12-29 ]

    or:

lib/App/YoutubeDlIfNotYet.pm  view on Meta::CPAN

                $mem{$video_id} = $line;
            }
        }
        #use DD; dd \%mem;
        \%mem;
    };

    $cache->{$id};
}

$SPEC{youtube_dl_if_not_yet} = {
    v => 1.1,
    summary => '(DEPRECATED) Download videos using youtube-dl only if videos have not been donwnloaded yet',
    description => <<'_',

This is a wrapper for **youtube-dl**; it tries to extract downloaded video ID's
from filenames or URL's or video ID's listed in a text file, e.g.:

    35682594        Table Tennis Shots- If Were Not Filmed, Nobody Would Believe [HD]-dUjxqFbWzQo.mp4       date:[2019-12-29 ]

or:

lib/App/YoutubeDlIfNotYet.pm  view on Meta::CPAN

                    "--log-file or put the log file in one of: ".
                    (join ", ", @paths) unless $path;
                $path;
            },
        },
    },
    deps => {
        prog => 'youtube-dl',
    },
};
sub youtube_dl_if_not_yet {
    my %args = @_;

    my @argv_for_youtube_dl;
    for my $arg (@{$args{urls_or_ids}}) {
        my $video_id = YouTube::Util::extract_youtube_video_id($arg);
        if ($video_id) {
            log_trace "Got video ID %s for argument %s", $video_id, $arg;
            if (my $filename = _search_id_in_log_file($video_id, $args{log_file})) {
                log_info "Video ID %s (%s) has been downloaded, skipped", $video_id, $filename;
                next;

lib/App/YoutubeDlIfNotYet.pm  view on Meta::CPAN


=head1 DEPRECATION NOTICE

Superseded by L<youtube-dl-if> (from L<App::YoutubeDlIf>).

=head1 DESCRIPTION

=head1 FUNCTIONS


=head2 youtube_dl_if_not_yet

Usage:

 youtube_dl_if_not_yet(%args) -> [status, msg, payload, meta]

(DEPRECATED) Download videos using youtube-dl only if videos have not been donwnloaded yet.

This is a wrapper for B<youtube-dl>; it tries to extract downloaded video ID's
from filenames or URL's or video ID's listed in a text file, e.g.:

 35682594        Table Tennis Shots- If Were Not Filmed, Nobody Would Believe [HD]-dUjxqFbWzQo.mp4       date:[2019-12-29 ]

or:

script/youtube-dl-if-not-yet  view on Meta::CPAN

our $VERSION = '0.003'; # VERSION
# FRAGMENT id=shcompgen-hint command=_youtube-dl

use 5.010001;
use strict;
use warnings;

use Perinci::CmdLine::Any;

Perinci::CmdLine::Any->new(
    url => '/App/YoutubeDlIfNotYet/youtube_dl_if_not_yet',
    log => 1,
    log_level => 'info',
    read_config => 0,
    read_env => 0,
    allow_unknown_opts => 1,
)->run;

# PODNAME: youtube-dl-if-not-yet
# ABSTRACT: (DEPRECATED) Download videos using youtube-dl only if videos have not been donwnloaded yet



( run in 0.544 second using v1.01-cache-2.11-cpan-cc502c75498 )