From 7b706ffbe5f634a940ff2de9b858768b8688b211 Mon Sep 17 00:00:00 2001 From: HUMORCE Date: Sun, 13 Aug 2023 13:36:42 +0000 Subject: [PATCH] adwcleaner@8.4.0: Fix url, Fix checkver, autoupdate --- bucket/adwcleaner.json | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/bucket/adwcleaner.json b/bucket/adwcleaner.json index c9157892716ff3..ef6b3de37dd7eb 100644 --- a/bucket/adwcleaner.json +++ b/bucket/adwcleaner.json @@ -8,8 +8,8 @@ }, "architecture": { "64bit": { - "url": "https://download.toolslib.net/download/direct/1/latest?channel=release#/adwcleaner.exe", - "hash": "4180ef83ba3d6dfdc6a233486437fc3f772b61dff85374072992bf024390aac2" + "url": "https://download.toolslib.net/download/file/1/2697?s=qf0hOJirlcuPMnv3IAYMEJUcgVB6urVN#/adwcleaner.exe", + "hash": "1f544da66675521a649e632108f86afb351ad336bd34b7b5c3d290827ebeef54" } }, "bin": "adwcleaner.exe", @@ -20,14 +20,25 @@ ] ], "checkver": { - "url": "https://toolslib.net/downloads/viewdownload/1-adwcleaner/files/?t=release", - "regex": ">([\\d.]+)<\\/td>" + "script": [ + "$content = (Invoke-WebRequest 'https://toolslib.net/downloads/viewdownload/1-adwcleaner/files/?t=release').Content", + "$content -match '1-adwcleaner/files/(?\\d+)/'; $release = $Matches['release']", + "$content = (Invoke-WebRequest \"https://toolslib.net/downloads/finish/1-adwcleaner/$release/\").Content", + "$content -match 'AdwCleaner \\((?[\\d.]+)\\)'; $version = $Matches['version']", + "$content -match \"$release\\?s=(?\\w+)\"; $s = $Matches['s']", + "Write-Output $version $release $s" + ], + "regex": "([\\d.]+) (?\\d+) (?\\w+)" }, "autoupdate": { "architecture": { "64bit": { - "url": "https://download.toolslib.net/download/direct/1/latest?channel=release#/adwcleaner.exe" + "url": "https://download.toolslib.net/download/file/1/$matchRelease?s=$matchS#/adwcleaner.exe" } + }, + "hash": { + "url": "https://toolslib.net/downloads/viewdownload/1-adwcleaner/files/$matchRelease", + "regex": "$sha256" } } }