feat: add m3u8 download script
continuous-integration/drone/push Build is passing Details

master
Evan Chen 2021-09-24 17:39:58 +08:00
parent 467456e6e4
commit 47b1b00468
2 changed files with 14 additions and 3 deletions

View File

@ -51,10 +51,15 @@ echo file: $file
while read p; do while read p; do
if [[ $p != "#"* ]]; then if [[ $p != "#"* ]]; then
pp=$(echo $p | sed 's/[\*\.\&\?]/\\&/g') pp=$(echo $p | sed 's/[\*\.\&\?]/\\&/g')
ts="$(echo $BASE | sed "s,$file,$pp,") -o $p" ts="$(echo $BASE | sed "s,$file,$pp,") -o $p -w '%{http_code}'"
eval " $ts"
status_code=$(eval " $ts")
if [ $status_code != "200" ]; then
echo
echo ERROR: $status_code, 下載失敗.
cat $p
exit 1
fi
fi fi
done <index.m3u8 done <index.m3u8

View File

@ -36,4 +36,10 @@ status_code=$(eval " $ts")
echo echo
echo status_code: $status_code echo status_code: $status_code
if [ $status_code != "200" ]; then
echo ERROR: $status_code, 下載失敗.
cat $p
exit 1
fi