Last active
December 25, 2016 00:02
-
-
Save Stargateur/eea84b207f940cbe86ade22efca8e813 to your computer and use it in GitHub Desktop.
download rwby episode
This file contains 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 | |
episode="episode7" | |
mkdir "${episode}" | |
if [ $? -eq 1 ] | |
then | |
echo episode already exist | |
exit 1 | |
fi | |
cd ${episode} | |
list="list.txt" | |
> ${list} | |
url='http://wpc.1765a.taucdn.net/801765A/video/uploads/videos/4836d6d7-dbfb-4a79-a623-44910ee90353' | |
for number in {00001..99999} | |
do | |
file="${number}.ts" | |
curl "${url}/NewHLS-1080P${file}" -o "${file}" | |
if [ $(tail -c 8 "${file}") == '</Error>' ] | |
then | |
rm "${file}" | |
break | |
else | |
echo "file '${file}'" >> ${list} | |
fi | |
done | |
ffmpeg -f concat -i ${list} -c copy "episode.mkv" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment