Re: HowTo: Download YouTube videos (the easy way)
Originally Posted by
bashologist
Cool, that's really neat, didn't know that.
Check out this nice bash script.
Code:
#!/bin/bash
flash=$(ls -t /tmp/Flash* | head -n 1)
destination=$(find ~/.mozilla -name sessionstore.js -exec sed 's/.*title:"\([^"]*\).*selected.*/\1/' {} \;)
echo "waiting for download to finish ..."
size=$(du $flash)
while sleep 5s; do
if [ "$size" != "$(du $flash)" ]; then
size=$(du $flash)
continue
else
break
fi
done
cp "$flash" "$HOME/${destination////%2f}.swf"
Load a YouTube web page, wait a few seconds, run it, then look in your home directory. n_n
That's brilliant, thanks. I've been wanting to save a few youtube videos and this worked perfectly.
A computer without Microsoft is like a chocolate cake without mustard.
Bookmarks