xpock-dl: baixe vídeos do xpock.com.br (v20071030)
Publicado por Douglas Augusto 24/11/2007
[ Hits: 6.760 ]
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
Slocal Manipulação de pacotes Slackware
Aprenda a Gerenciar Permissões de Arquivos no Linux
Como transformar um áudio em vídeo com efeito de forma de onda (wave form)
Como aprovar Pull Requests em seu repositório Github via linha de comando
Aplicativo simples para gravar tela
Quebra de linha na data e hora no Linux Mint
trocar linhas [RESOLVIDO] (11)
Firefox não abre em usuário não administradores (2)
Ubuntu com problemas no áudio (1)