mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-11-10 01:53:28 +01:00
Add www subdomain support for various sources (#1222)
This commit is contained in:
@@ -10,7 +10,8 @@ class NeutronCode extends AppSource {
|
||||
|
||||
@override
|
||||
String sourceSpecificStandardizeURL(String url) {
|
||||
RegExp standardUrlRegEx = RegExp('^https?://$host/downloads/file/[^/]+');
|
||||
RegExp standardUrlRegEx =
|
||||
RegExp('^https?://(www\\.)?$host/downloads/file/[^/]+');
|
||||
RegExpMatch? match = standardUrlRegEx.firstMatch(url.toLowerCase());
|
||||
if (match == null) {
|
||||
throw InvalidURLError(name);
|
||||
|
||||
Reference in New Issue
Block a user