feat : match extractor based on regex

This commit is contained in:
coxju 2024-01-20 09:54:09 +05:30
parent 01f21e0fe8
commit 4736bff0b3

View file

@ -602,6 +602,15 @@ suspend fun loadExtractor(
}
}
for (extractor in extractorApis) {
try {
if (Regex(extractor.mainUrl).find(currentUrl) != null) {
extractor.getSafeUrl(currentUrl, referer, subtitleCallback, callback)
return true
}
} catch (_: PatternSyntaxException) {}
}
// this is to match mirror domains - like example.com, example.net
for (extractor in extractorApis) {
if (FuzzySearch.partialRatio(