Created
June 9, 2012 22:15
-
-
Save thbkrkr/2902786 to your computer and use it in GitHub Desktop.
get arte video url for flvstream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
url=http://videos.arte.tv/fr/videos/survivre_au_progres-6703188.html | |
g() { | |
local grepMotif="$1" | |
local sedRegExp="$2" | |
echo " grep $grepMotif | sed $sedRegExp in curl $url ..." | |
curl -s $url -o .temp_curlarte | |
url=$(cat .temp_curlarte | grep "$grepMotif" | sed "s/$sedRegExp/\1/") | |
} | |
g 'var.*fFileUrl' '.*\"\(.*\)\";' | |
g 'lang=\"fr\"' '.*ref=\"\(.*\)\".*' | |
g 'uality=\"hd\"' '.*>\(.*\)<.*' | |
echo -e "\n Success -> flvstreamer -e -r \"$url\" -o video.mp4" && rm .temp_curlarte |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment