-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
InternetArchive.sh
51 lines (39 loc) · 1.24 KB
/
InternetArchive.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
download_7z_files() {
url="$1"
wget -qO- "$url" | \
grep -Eo '<td><a href="[^"]+\.7z' | \
head -1 | \
sed 's/^<td><a href="//' | \
while read -r file; do
wget -nc --show-progress --quiet "$url/$file"
done
}
export -f download_7z_files
urls=(
"https://archive.org/download/nointro.gb"
"https://archive.org/download/nointro.gbc"
"https://archive.org/download/nointro.gba"
"https://archive.org/download/nointro.snes"
"https://archive.org/download/nointro.md"
"https://archive.org/download/nointro.nes-headered"
)
parallel -j 6 download_7z_files ::: "${urls[@]}"
download_zip_files() {
url="$1"
wget -qO- "$url" | \
grep -Eo '<td><a href="[^"]+\.zip' | \
head -1 | \
sed 's/^<td><a href="//' | \
while read -r file; do
wget -nc --show-progress --quiet "$url/$file"
done
}
export -f download_zip_files
urls=(
"https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Game%20Boy/"
"https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Game%20Boy%20%28Private%29/"
"https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Game%20Boy%20Advance/"
"https://myrient.erista.me/files/No-Intro/Nintendo%20-%20Game%20Boy%20Color/"
)
parallel -j 4 download_zip_files ::: "${urls[@]}"