Last active
August 7, 2018 17:04
-
-
Save taroyanaka/0dbb173cb88b4747a93ab2df8980768c to your computer and use it in GitHub Desktop.
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
DIRNAME=`find -f *.m3u8|awk '{gsub(/\.m3u8/,"");print;}'` | |
mkdir $DIRNAME | |
mv *.m3u8 ./$DIRNAME/ | |
cd ./$DIRNAME/ | |
cat *.m3u8|grep https >> new.m3u8 | |
split -l 100 new.m3u8 | |
for i in {a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y} | |
do; | |
HOGE="xa$i"; | |
(cat ./$HOGE | | |
while read line; | |
do; | |
curl -s "$line" >> ./$HOGE"1" ; | |
done; | |
) &; | |
done; | |
wait | |
cat *1 > all.ts | |
ls | grep -v -E ".*\.ts" | xargs rm -r | |
cd ../ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment