mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-19 05:00:21 +02:00
Merge pull request #1774 from ImranR98/dev
- Fix bug introduced in v1.1.16: APKPure fails to find universal APKs - Fix bugs found in APKPure URL matching
This commit is contained in:
@@ -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/)
|
||||
|
@@ -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('', '');
|
||||
}
|
||||
|
@@ -763,9 +763,9 @@ class SourceProvider {
|
||||
APKPure(),
|
||||
Aptoide(),
|
||||
Uptodown(),
|
||||
APKMirror(),
|
||||
HuaweiAppGallery(),
|
||||
Jenkins(),
|
||||
APKMirror(),
|
||||
Signal(),
|
||||
VLC(),
|
||||
WhatsApp(),
|
||||
|
@@ -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'
|
||||
|
Reference in New Issue
Block a user