Improved APKPure compatibility by prioritizing APK when available (over XAPK)

This commit is contained in:
Imran Remtulla
2024-09-05 13:10:02 -04:00
parent 151e085655
commit e019c8027b

View File

@@ -109,11 +109,16 @@ class APKPure extends AppSource {
'')
?.group(0)
?.trim();
String? type = apkInfo
?.querySelector('div.info-top span.tag')
?.text
.trim() ??
'APK';
var types = apkInfo
?.querySelectorAll('div.info-top span.tag')
.map((e) => e.text.trim())
.map((t) => t == 'APKs' ? 'APK' : t) ??
[];
String type = types.length == 0
? 'APK'
: types.length == 1
? types.first
: types.last;
String? dateString = apkInfo
?.querySelector('div.info-bottom span.time')
?.text