Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Script(Gui)to download it in the folder /Home/User/DownFlas videos that are playing Firefox or Chrome
- # By Frannoe@gmail.com
- # http://ubuntu-cosillas.blogspot.com/
- #-----------------------------------------------
- #Note:
- #Part of this code has been written by ajvajv:
- #lsof -n|grep Flash|while read ;
- #do
- #R1=`echo $REPLY|cut -d' ' -f2`;
- #R2=`echo $REPLY|cut -d' ' -f4`;
- #cp /proc/$R1/fd/${R2:0:2} video$R1$R2.flv;
- #done
- #------------------------------------------------
- if lsof -n|grep Flash
- then
- lsof -n|grep Flash|while read
- mkdir -p $HOME/DownFlash/
- do
- R1=`echo $REPLY|cut -d' ' -f2`
- R2=`echo $REPLY|cut -d' ' -f4`
- if cp /proc/$R1/fd/${R2:0:2} $HOME/DownFlash/video_$R1$R2.flv
- then
- zenity --question --title "Vídeos Flash Player" --text="El vídeo <b>$R1$R2.flv</b> ha sido descargado en la siguiente ruta:\n<b> $HOME/DownFlash/ </b>\n\n¿Desea comprobar si quedan más vídeos para descargar?"
- if [ $? -eq 1 ]
- then
- zenity --error --title "Cancelado" --text="Todas las descargas han sido canceladas"
- break
- fi
- else
- zenity --info --title "Sin más datos" --text="No hay más <b>vídeos</b> que se estén reproducciendo\no se puedan descargar en este momento"
- break
- fi
- done
- else
- zenity --info --title "Aviso" --text="No hay vídeos de <b>Flash Player</b> reproduciendose en su navegador.\n\nAsegúrese de que los vídeos que quiera descargarse han comenzado su reproducción aunque sea una vez y contengan\npreferiblemente su Buffer al completo para que la descarga se realice en su totalidad y no tan sólo en parte.\nLuego vuelva a intentarlo."
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement