Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (loadExtractor) : match mirror domains of extractor link #877

Merged
merged 1 commit into from Jan 17, 2024
Merged

feat (loadExtractor) : match mirror domains of extractor link #877

merged 1 commit into from Jan 17, 2024

Conversation

ghost
Copy link

@ghost ghost commented Jan 13, 2024

No description provided.

@ghost
Copy link
Author

ghost commented Jan 13, 2024

i think this might cause issue, if two extractors have similar domain. and the link matches partially to the wrong domain.

@ghost ghost marked this pull request as ready for review January 13, 2024 13:36
if (compareUrl.startsWith(extractor.mainUrl.replace(schemaStripRegex, ""))) {
if (compareUrl.startsWith(extractor.mainUrl.replace(schemaStripRegex, "")) ||
// this is to match mirror domains - like example.com, example.net
FuzzySearch.partialRatio(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is better done in a second loop, lest a partial domain gets prioritized over an exact match

@Blatzar
Copy link
Contributor

Blatzar commented Jan 13, 2024

Good thinking!

@fire-light42 fire-light42 merged commit 1676094 into recloudstream:master Jan 17, 2024
1 of 2 checks passed
@ghost ghost deleted the feat-loadExtractor branch January 18, 2024 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants