xpock-dl: baixe vídeos do xpock.com.br (v20071030)
Publicado por Douglas Augusto 24/11/2007
[ Hits: 6.808 ]
Xpock.com.br é um site brasileiro que provê vídeos ao estilo Youtube.com, e como este requer o plugin Flash ao passo que não fornece acesso direto aos seus vídeos.
O xpock-dl é um shell script que, dado o endereço da página de um vídeo do xpock.com.br, extrai sua URL e o baixa como um arquivo FLV (Macromedia Flash Video). Este formato de vídeo, no entanto, pode normalmente ser visualizado por programas livres como mplayer ou VLC, não sendo assim necessário o Adobe Flash.
Versão de 30/10/2007.
#!/bin/sh # xpock-dl - download a video file from xpock.com.br # # USAGE: # xpock-dl video_page_url [video1_page_url ...] # # REQUIRES: curl, sh, sed, grep, basename (coreutils) # xpock-dl # Copyright (C) 2007 Douglas A. Augusto (daaugusto@gmail.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. echo "xpock-dl v20071030" # Check dependencies DEP="curl sed grep basename" for d in $DEP; do if ! type -a $d >> /dev/null 2>&1; then echo "Error: $d is required!"; exit 1; fi done for i in $* do echo; echo "Extracting video url from $i..." FLV=`curl -s -S "$i" | grep "file=" | grep -m 1 "\.flv" | \ sed 's/.*file=\(.*.flv\).*/\1/' | sed 's/ //g'` if [ "$?" == "0" -a "$FLV" != "" ]; then echo; echo "Saving $FLV"; else echo "The video url couldn't be found! Please ensure that the flash video is actually hosted on xpock.com.br" exit 1; fi #OUT=`basename "$FLV"` OUT="`basename "$i" .flv`.flv" curl --progress-bar "$FLV" -o "$OUT" \ -w "Downloaded %{size_download} bytes in %{time_total} seconds (%{speed_download}B/s).\n" if [ "$?" == "0" ]; then echo; echo "Video saved as: $OUT"; else echo "An error occurred while saving the FLV video!"; exit 1; fi done
Pré Configuração do SQuiD Slackware
Usar o Google Translate para ler (speak) a seleção
Busca e move arquivos renomeando-os conforme a máscara
Parando o Screeensaver do Gnome durante uma reprodução no mplayer
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Atualizar Debian Online de uma Versão para outra
Instalar driver Nvidia no Debian 13
Redimensionando, espelhando, convertendo e rotacionando imagens com script
Debian 13 Trixie para Iniciantes
Convertendo pacotes DEB que usam ZSTD (Padrão Novo) para XZ (Padrão Antigo)
baschrc customizado pegeui vários. (2)
Rust é o "C da nossa geração"? (8)