Skip to content

Commit

Permalink
Update InternetArchive.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinebou12 authored Feb 18, 2024
1 parent cd0e385 commit 09fe339
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions InternetArchive.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash




download_7z_files() {
url="$1"
wget -qO- "$url" | \
Expand All @@ -23,3 +26,26 @@ urls=(
)

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[@]}"

0 comments on commit 09fe339

Please sign in to comment.