feat: add m3u8 download script
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
467456e6e4
commit
47b1b00468
11
m3u8下載/dl.sh
11
m3u8下載/dl.sh
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue