Outils pour utilisateurs

Outils du site


bash:capture_d_ecran_de_pages_web_completes

Script à utiliser sous GNU/Linux avec CutyCapt (testé dispo dans dépôts Ubuntu/Debian)

webcapt
#!/bin/bash
url="$1"
if [ -z "$1" ]
then read -p "url ? " url
fi
server=`echo $url | awk -F "/" '{print $3}'`
server_out=`echo $server | sed 's/\./_/g'`
filename=`echo $url | sed s/$server// | sed 's/http:\/\///'`
filename_out=`echo $url | sed s/$server// | sed 's/http:\/\///' | sed 's/https:\/\///' | sed 's/\//_/g' | sed 's/[^0-9a-z]//g'`
if [ -z "$filename_out" ]
then filename_out=`echo "index"`
fi
mkdir -p "$server_out"
echo "***"
echo "Output: $filename_out in $server_out"
echo "***"
cutycapt --url=$url --private-browsing=on --user-agent="Mozilla/5.0 (X11; U; Linux x86_64; C) CutyCapt" --header=DNT:1 --min-width=1280 --min-height=720 --out="$server_out/$filename_out.svg"
echo "SVG: ok"
cutycapt --url=$url --private-browsing=on --user-agent="Mozilla/5.0 (X11; U; Linux x86_64; C) CutyCapt" --header=DNT:1 --min-width=1280 --min-height=720 --out="$server_out/$filename_out.jpg"
echo "JPG: ok. Game Over."
bash/capture_d_ecran_de_pages_web_completes.txt · Dernière modification: 2013/02/19 19:28 (modification externe)