File size: 594 Bytes
30470dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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