File: recently_added.pl

package info (click to toggle)
libwebservice-youtube-perl 1.0.3-4.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 416 kB
  • sloc: perl: 5,070; makefile: 4
file content (24 lines) | stat: -rwxr-xr-x 646 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env perl
#
# $Id: recently_added.pl 11 2007-04-09 04:34:01Z hironori.yoshida $
#
package main;
use strict;
use warnings;
use version; our $VERSION = qv('1.0.3');

use blib;

use WebService::YouTube;

my $youtube = WebService::YouTube->new;

print "\n1. Get the information of the recently_added videos via RSS Feed.\n\n";
my @videos = $youtube->feeds->recently_added;
foreach my $video (@videos) {
    printf "%-33s    %-42s\n", $video->url, $video->title;
}

my $video = $videos[ int rand @videos ];
printf "\n2. The download URI of %s is here,\n\n", $video->id;
printf "    %s\n\n", WebService::YouTube::Util->get_video_uri($video);