dl_apkmirror: fix version url

This commit is contained in:
j-hc 2025-02-03 17:10:46 +03:00
parent 8276e48295
commit e89f71c1ae
No known key found for this signature in database
GPG Key ID: CDF97F1DBFE904CD

View File

@ -317,8 +317,10 @@ dl_apkmirror() {
is_bundle=true
else
if [ "$arch" = "arm-v7a" ]; then arch="armeabi-v7a"; fi
local resp node app_table dlurl=""
url="${url}/${url##*/}-${version//./-}-release/"
local resp node app_table uurl dlurl=""
uurl=$(grep -F "downloadLink" <<<"$__APKMIRROR_RESP__" | grep -F "${version//./-}-release/" |
sed -n 's;.*href="\(.*-release\).*;\1;p')
if [ -z "$uurl" ]; then url="${url}/${url##*/}-${version//./-}-release/"; else url=https://www.apkmirror.com$uurl; fi
resp=$(req "$url" -) || return 1
node=$($HTMLQ "div.table-row.headerFont:nth-last-child(1)" -r "span:nth-child(n+3)" <<<"$resp")
if [ "$node" ]; then