diff --git a/lib/app_sources/apkpure.dart b/lib/app_sources/apkpure.dart index b3fe901..4e8a69e 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) {