Here's a couple of scripts for saving Youtube Flash Videos to your hard drive
Script1 locateallflashfiles.sh |
|
|
Comments (16)
I see just two...
#!/bin/bash # # FLASHCOPY # # Will ieterate through all open copies flashplayer and copy flash video to the # current folder (or specified directory) with the .flv extension added. # # USAGE: # flashcopy . (copy to current directory) # flashcopy ~/Videos (copying to a specified directory) # # This is done by finding all running copies of the flash player and looking at # what files are opened by the process. If the file is a /tmp/Flash file # it is copied
args=("$@")
args=`echo $args | sed 's/[/]$//'`
pids=`eval pgrep -f flashplayer` for pid in $pids do lsoutput=$(lsof -p $pid | grep '/tmp/Flash[^ ]*')
IFS=$'n' for line in $lsoutput; do lsout1=`echo $line | awk '{print "/proc/" $2 "/fd/" $4}' | sed 's/[rwu]$//'` lsout2=`echo $line | awk '{print $9}' | awk -F '/' '{print $3}'`
if [ -n "$args" ];then if [ -d $args ]; then echo "Copying $lsout2 to $args/" eval "cp $lsout1 $args/$lsout2.flv" else echo "The directory "$args" doesn't exist" break fi else echo "Copying $lsout2" eval "cp $lsout1 $lsout2.flv" fi done
done
Had drive????
lsof uninstalled ???!!
no lsof, no privilege to install it.
d@mn.
Will try on another one.
Anyway thanks !
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Sign up and post (it is free) or Log in and post
