From e457b9ff7d101dd2ec034b3fd0930e1b9aa0d55b Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 20 Dec 2024 05:34:04 +0100 Subject: [PATCH] fix: Update download links --- src/mido.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mido.sh b/src/mido.sh index 4804390..e03c9f5 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -620,10 +620,11 @@ getMG() { } local list="" - list=$(echo "$body" | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | grep -i '\.iso$') + list=$(echo "$body" | xmllint --html --nonet --xpath "//a[contains(text(), '.iso')]" - 2>/dev/null) local result="" result=$(echo "$list" | grep -i "${platform}" | grep "${pattern}" | grep -i -m 1 "${locale,,}_") + result=$(echo "$result" | sed -r 's/.*href="([^"]+).*/\1/g') if [ -z "$result" ]; then if [[ "${lang,,}" != "en" ]] && [[ "${lang,,}" != "en-"* ]]; then