Programming and Scripting :: Script for downloading Youtube videos



I copied the script to a file called "rip" , and ran "rip [the youtube URL]"; produced a "wget --n invalid option" error.  No doubt, I'm missing something obvious.

Usage: wget [-c|--continue] [-q|--quiet] [-O|--output-document file]
               [--header 'header: value'] [-Y|--proxy on/off] [-P DIR] url

That's probably due to the wget from busybox...
Quote
-nv
Non-verbose - turn off verbose without being completely quiet (use -q for that), which means that error messages and basic information still get printed.
Should be safe just to remove it.

I did have full wget.. That seems the right solution for busybox version
Quote (curaga @ July 05 2007,04:52)
I did have full wget.. That seems the right solution for busybox version

Doesn't matter;  the script doesn't work even with the full wget installed.  I don't know much about mktemp, but I tried it with that and directing to a file  'mktp'

EDIT:  Problem was those little single quotes around mktemp didn't copy correctly; things almost working, although:

--00:56:25--  http://youtube.com/get_video.php?hl=en&video_id=prjQ7MwuCWI&l=82&t=OEgsToPDskI2GsLOn4un5ApwsZjXyl07&soff=1&sk=Tja__uRBddjozZ4rjZMhogC
          => `mktemp.flv'
Resolving youtube.com... 208.65.153.253, 208.65.153.251
Connecting to youtube.com[208.65.153.253]:80... connected.
HTTP request sent, awaiting response... 303 See Other
00:56:25 ERROR 303: See Other.

I had this fully working.. But I personally haven't tested on DSL.
Those aren't single quotes, those are "backquotes" meaning the output of that command will be there:
VAR=`mktemp` VAR will have the output of mktemp
VAR='mktemp' VAR will have "mktemp"

I'll edit it for DSL needs. The link will stay the same.

Next Page...
original here.