diff --git a/README.md b/README.md index 712520f5..15720dc6 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ Currently supported App sources: - [APKPure](https://apkpure.net/) - [Aptoide](https://aptoide.com/) - [Uptodown](https://uptodown.com/) - - [APKMirror](https://apkmirror.com/) (Track-Only) - [Huawei AppGallery](https://appgallery.huawei.com/) - Jenkins Jobs + - [APKMirror](https://apkmirror.com/) (Track-Only) - Open Source - App-Specific: - [Signal](https://signal.org/) - [VLC](https://videolan.org/) diff --git a/lib/app_sources/apkpure.dart b/lib/app_sources/apkpure.dart index 44809266..4e8a69ea 100644 --- a/lib/app_sources/apkpure.dart +++ b/lib/app_sources/apkpure.dart @@ -31,14 +31,15 @@ class APKPure extends AppSource { @override String sourceSpecificStandardizeURL(String url) { RegExp standardUrlRegExB = RegExp( - '^https?://m.${getSourceRegex(hosts)}/+[^/]+/+[^/]+(/+[^/]+)?', + '^https?://m.${getSourceRegex(hosts)}(/+[^/]{2})?/+[^/]+/+[^/]+', caseSensitive: false); RegExpMatch? match = standardUrlRegExB.firstMatch(url); if (match != null) { - url = 'https://${getSourceRegex(hosts)}${Uri.parse(url).path}'; + var uri = Uri.parse(url); + url = 'https://${uri.host.substring(2)}${uri.path}'; } RegExp standardUrlRegExA = RegExp( - '^https?://(www\\.)?${getSourceRegex(hosts)}/+[^/]+/+[^/]+(/+[^/]+)?', + '^https?://(www\\.)?${getSourceRegex(hosts)}(/+[^/]{2})?/+[^/]+/+[^/]+', caseSensitive: false); match = standardUrlRegExA.firstMatch(url); if (match == null) { @@ -93,7 +94,11 @@ class APKPure extends AppSource { var apkUrls = apksDiv ?.querySelectorAll('div.group-title') .map((e) { - String? architecture = e.text.trim(); + String architecture = e.text.trim(); + if (architecture.toLowerCase() == 'unlimited' || + architecture.toLowerCase() == 'universal') { + architecture = ''; + } // Only take the first APK for each architecture, ignore others for now, for simplicity // Unclear why there can even be multiple APKs for the same version and arch var apkInfo = e.nextElementSibling?.querySelector('div.info'); @@ -116,6 +121,7 @@ class APKPure extends AppSource { DateTime? releaseDate = parseDateTimeMMMddCommayyyy(dateString); if (additionalSettings['autoApkFilterByArch'] == true && + architecture.isNotEmpty && !supportedArchs.contains(architecture)) { return const MapEntry('', ''); } diff --git a/lib/providers/source_provider.dart b/lib/providers/source_provider.dart index 10137feb..e4a23ebc 100644 --- a/lib/providers/source_provider.dart +++ b/lib/providers/source_provider.dart @@ -763,9 +763,9 @@ class SourceProvider { APKPure(), Aptoide(), Uptodown(), - APKMirror(), HuaweiAppGallery(), Jenkins(), + APKMirror(), Signal(), VLC(), WhatsApp(), diff --git a/pubspec.yaml b/pubspec.yaml index a282f93e..c812cd5c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.1.16+2273 +version: 1.1.17+2274 environment: sdk: '>=3.0.0 <4.0.0'