mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
feat : match extractor based on regex
This commit is contained in:
parent
01f21e0fe8
commit
4736bff0b3
1 changed files with 9 additions and 0 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue