From b51e89305076093b3f9ca17e0e3c9c2948dde1e8 Mon Sep 17 00:00:00 2001 From: Fioren <102145692+FiorenMas@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:48:40 +0700 Subject: [PATCH] fix apkmirror fix apkmirror "too many request" problem --- src/build/utils.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/build/utils.sh b/src/build/utils.sh index a3fbd91..fb26181 100644 --- a/src/build/utils.sh +++ b/src/build/utils.sh @@ -95,9 +95,11 @@ dl_apk() { url="https://www.apkmirror.com$(req "$url" - | tr '\n' ' ' | sed -n "s/href=\"/@/g; s;.*${regexp}.*;\1;p")" echo "$url" url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "a.accent_bg.btn") + sleep 10 resp=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "span > a[rel = nofollow]") if [[ -z $resp ]]; then url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "a.accent_bg.btn") + sleep 10 url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "span > a[rel = nofollow]") else url=$(req "$url" - | $HTMLQ --base https://www.apkmirror.com --attribute href "span > a[rel = nofollow]")