CABankSakura / retriever.sh
Fhrozen's picture
main files
30470dd
raw
history blame
594 Bytes
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
main_link="https://media.talkbank.org/ca/Sakura"
rm -f *.txt
wget --no-check-certificate ${main_link} -O orig_lnk.txt
ext=mp4
mkdir -p dummy/${ext}
grep -e '.'"${ext}"'"' orig_lnk.txt | sed -e 's|.*href="||g' \
| sed -e 's|">.*||g' \
| awk -v LNK=${main_link} '{print LNK "/" $1}' > ${ext}_links.txt
wget --no-check-certificate -i ${ext}_links.txt -c -nc -t 3 -P dummy/${ext}
wget --no-check-certificate https://ca.talkbank.org/data/Sakura.zip -c -nc -t 3
unzip -q Sakura.zip
mv Sakura dummy/cha
rm -f *.txt
rm -f *.zip