-
Notifications
You must be signed in to change notification settings - Fork 775
add Videa.hu extractor #2491
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
base: master
Are you sure you want to change the base?
add Videa.hu extractor #2491
Conversation
library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/Videa.kt
Outdated
Show resolved
Hide resolved
| override val requiresReferer = false | ||
|
|
||
| private val videaSecret = "xHb0ZvME5q8CBcoQi6AngerDu3FGO9fkUlwPmLVY_RTzj2hJIS4NasXWKy1td7p" | ||
| private var key = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there class variables? Extractors are supposed to be stateless. CloudStream uses the same extractor to dispatch several getUrl in parallel, and as such this looks like a multithreading issue waiting to happen.
| val redirectMatch = """<error.*?"noembed".*>(.*)</error>""".toRegex().find(videaXml) | ||
|
|
||
| if (redirectMatch != null) { | ||
| currentUrl = redirectMatch.groupValues[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also include a check to prevent inf recursion. E.g. && redirectMatch.groupValues[1] != currentUrl
| if (redirectMatch != null) { | ||
| currentUrl = redirectMatch.groupValues[1] | ||
| } else { | ||
| found = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use break?
Created New Videa.hu extractor