add duolingo

This commit is contained in:
siritami
2025-01-28 01:27:34 +07:00
parent ea3645c21c
commit a8434dbefc
7 changed files with 37 additions and 4 deletions

View File

@@ -214,7 +214,8 @@ get_apk() {
local attempt=0
while [ $attempt -lt 10 ]; do
if [[ -z $version ]] || [ $attempt -ne 0 ]; then
version=$(req "https://www.apkmirror.com/uploads/?appcategory=$3" - | \
local upload_tail="?$([[ $3 = duolingo ]] && echo devcategory= || echo appcategory=)"
version=$(req "https://www.apkmirror.com/uploads/$upload_tail$3" - | \
$pup 'div.widget_appmanager_recentpostswidget h5 a.fontBlack text{}' | \
grep -Evi 'alpha|beta' | \
grep -oPi '\b\d+(\.\d+)+(?:\-\w+)?(?:\.\d+)?(?:\.\w+)?\b' | \