mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-17 04:08:09 +02:00
Fix bugs in APKPure URL matching
This commit is contained in:
@@ -31,14 +31,15 @@ class APKPure extends AppSource {
|
|||||||
@override
|
@override
|
||||||
String sourceSpecificStandardizeURL(String url) {
|
String sourceSpecificStandardizeURL(String url) {
|
||||||
RegExp standardUrlRegExB = RegExp(
|
RegExp standardUrlRegExB = RegExp(
|
||||||
'^https?://m.${getSourceRegex(hosts)}/+[^/]+/+[^/]+(/+[^/]+)?',
|
'^https?://m.${getSourceRegex(hosts)}(/+[^/]{2})?/+[^/]+/+[^/]+',
|
||||||
caseSensitive: false);
|
caseSensitive: false);
|
||||||
RegExpMatch? match = standardUrlRegExB.firstMatch(url);
|
RegExpMatch? match = standardUrlRegExB.firstMatch(url);
|
||||||
if (match != null) {
|
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(
|
RegExp standardUrlRegExA = RegExp(
|
||||||
'^https?://(www\\.)?${getSourceRegex(hosts)}/+[^/]+/+[^/]+(/+[^/]+)?',
|
'^https?://(www\\.)?${getSourceRegex(hosts)}(/+[^/]{2})?/+[^/]+/+[^/]+',
|
||||||
caseSensitive: false);
|
caseSensitive: false);
|
||||||
match = standardUrlRegExA.firstMatch(url);
|
match = standardUrlRegExA.firstMatch(url);
|
||||||
if (match == null) {
|
if (match == null) {
|
||||||
|
Reference in New Issue
Block a user