Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

using WWW::YouTube::Download?

by squishy (Initiate)
on Jun 18, 2012 at 21:37 UTC ( #976910=perlquestion: print w/replies, xml ) Need Help??
squishy has asked for the wisdom of the Perl Monks concerning the following question:

I've poked about Google looking for example code using this module. Unfortunately, I haven't found anything.

I know YouTube changes their formats periodically, but I haven't been able to find anything stating whether WWW::YouTube::Download is still viable or not. Given the information on the CPAN Webpage does anyone here know:

  • What is the form of the $video_id?
  • What is the form expected for callback?

Any insight shared would be greatly appreciated! Thanks!

Replies are listed 'Best First'.
Re: using WWW::YouTube::Download?
by frozenwithjoy (Priest) on Jun 19, 2012 at 00:59 UTC
    Given the YouTube url, the $video_id is sP4NMoJcFd4.

    UPDATE... The following was sufficient to d/l that video (and it played successfully using VLC). I also used some of the other calls successfully, so it seems like all is working well with this module.

    #!/usr/bin/env perl use strict; use warnings; use WWW::YouTube::Download; my $video_id = "sP4NMoJcFd4"; my $client = WWW::YouTube::Download->new; $client->download($video_id);
      I tried this code to download a youtube video and got the message: !! download failed: 403 Forbidden at C:\...\ line 8 If you can offer some suggestions to prevent this negative response, I would appreciate.
        I re-ran the code I posted in June (that definitely worked in June) and I'm getting a 403 error, too. Perhaps YouTube is blocking downloading of videos in this manner.
Re: using WWW::YouTube::Download?
by Anonymous Monk on Jun 18, 2012 at 21:45 UTC
Re: using WWW::YouTube::Download?
by linuxkid (Sexton) on Jun 19, 2012 at 20:31 UTC

    Next time, please try reading the code first!


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://976910]
Approved by NetWallah
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2018-02-21 07:25 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (275 votes). Check out past polls.