1 |
On Sat, 16 Dec 2006 09:57:05 -0800 |
2 |
Kevin O'Gorman wrote: |
3 |
|
4 |
> I'm up-to-date on stable ebuilds. |
5 |
> I've tried to view a cute youTube "Code Monkey" video, but get the |
6 |
> complaint my flash Player plugin is obsolete (or I'm blocking |
7 |
> Javascript, which is false). It's |
8 |
> at http://www.youtube.com/watch?v=2lLRBiEBRAc |
9 |
|
10 |
Here's some code for downloading youtube videos: |
11 |
------------------------------------------------ |
12 |
#!/usr/bin/perl |
13 |
|
14 |
$base="http://videodownloader.net/get/?url="; |
15 |
|
16 |
if ($#ARGV==-1) { |
17 |
print "Usage: u2b.pl \"[youtube-url-here]\"\n"; |
18 |
exit(1); |
19 |
} |
20 |
$u2burl=$ARGV[0]; |
21 |
|
22 |
print "Fetching downloading url...\n\n"; |
23 |
$contents=`curl -s '$base/$u2burl'`; |
24 |
$contents=~s/\n//; |
25 |
$contents=~/<a href="http:\/\/youtube.com\/get_video\?(.*)">/; |
26 |
$contents=substr($1,0,55); |
27 |
print "Found: '$contents'\n\n"; |
28 |
system("wget -c 'http://youtube.com/get_video?$contents'"); |
29 |
print "\nAnd now...run mplayer!\n"; |
30 |
------------------------------------------------ |
31 |
|
32 |
PS: I don't have the author's name, so sorry if you find this without |
33 |
any note about you :-) |
34 |
|
35 |
|
36 |
Also, you could download "Ook? Video Ook!" Firefox's extension. |
37 |
|
38 |
HTH |
39 |
|
40 |
-- |
41 |
Arnau Bria |
42 |
http://blog.emergetux.net |
43 |
Wiggum: Dispara a las ruedas Lou. |
44 |
Lou: eee, es un tanque jefe. |
45 |
Wiggum: Me tienes hartito con todas tus excusas. |
46 |
-- |
47 |
gentoo-user@g.o mailing list |