Skip to content

Conversation

@KaifTaufiq
Copy link

Created New Videa.hu extractor

image

override val requiresReferer = false

private val videaSecret = "xHb0ZvME5q8CBcoQi6AngerDu3FGO9fkUlwPmLVY_RTzj2hJIS4NasXWKy1td7p"
private var key = ""
Copy link
Collaborator

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]
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just use break?

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.

2 participants