diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-02-08 08:50:34 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-02-08 08:50:34 +0100 |
commit | 30b4fd827dbe50d56bbc66859f46968e08f89b30 (patch) | |
tree | 5c084f9f4d8b5fd57a7d74f34f8aeb90654342f6 | |
parent | d6c2b4344a9ceb5ce156a4b1b2b7e649ebe49043 (diff) |
fix download script
-rwxr-xr-x | bulk-audio/get | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bulk-audio/get b/bulk-audio/get index 21dda29..b32f8a1 100755 --- a/bulk-audio/get +++ b/bulk-audio/get @@ -16,7 +16,7 @@ lp101() { # patience" message (404, but server sends 200 anyways) curl -X HEAD -iso - "$URL" | awk '/^Content-length:/ { exit $2 == 52288 }' [ $? -ne 0 ] && return - curl -so - "$URL" + curl -sLo - "$URL" exit 0 } @@ -29,7 +29,7 @@ lp101_alt() { [ $? -ne 0 ] && return URL="$(echo "$HTML" | pup "audio source attr{src}" | head -n1)" [ -z "$URL" ] && return - curl -so - "$URL" + curl -sLo - "$URL" exit 0 } @@ -38,7 +38,7 @@ jisho() { [ $? -ne 0 ] && return URL="$(echo "$HTML" | pup "audio[id=\"audio_$KANJI:$KANA\"] source attr{src}" | head -n1)" [ -z "$URL" ] && return - curl -so - "https:$URL" + curl -sLo - "https:$URL" exit 0 } @@ -48,7 +48,7 @@ nhk() { [ $? -ne 0 ] && return URL="$(echo "$HTML" | pup "#$(urlencode $KANJI) audio source[src\$=\".mp3\"] attr{src}" | head -n1)" [ -z "$URL" ] && return - curl -so - "$BASE_URL$URL" + curl -sLo - "$BASE_URL$URL" exit 0 } @@ -68,6 +68,7 @@ sources: lp101 JapanesePod101 lp101_alt JapanesePod101 (Alternate) jisho Jisho.org + nhk NHK日本語発音アクセント辞典 EOF } |