From d3390fefe6162c9006b15198f4f0d478afd949d1 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Fri, 13 May 2022 10:22:53 +0200 Subject: [PATCH] html parsing now done with xmllint, should be more resilient, maybe --- fragments/labels/adobecreativeclouddesktop.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fragments/labels/adobecreativeclouddesktop.sh b/fragments/labels/adobecreativeclouddesktop.sh index 7445443..95582db 100644 --- a/fragments/labels/adobecreativeclouddesktop.sh +++ b/fragments/labels/adobecreativeclouddesktop.sh @@ -2,10 +2,11 @@ adobecreativeclouddesktop) name="Adobe Creative Cloud" #appName="Install.app" type="dmg" + adobeurl="https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" if [[ $(arch) == "arm64" ]]; then - downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*macarm64.*dmg" | cut -d '"' -f1 | head -1) + downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'osx10')][contains(text(),'Download')]/@href)" - 2> /dev/null) elif [[ $(arch) == "i386" ]]; then - downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*osx10.*dmg" | cut -d '"' -f1 | head -1) + downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'macarm64')][contains(text(),'Download')]/@href)" - 2> /dev/null) fi #downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*dmg" | head -1) appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2)