Skip to content

Conversation

@okibcn
Copy link
Contributor

@okibcn okibcn commented Feb 4, 2026

Pull Request: Uqload Extractor - Fix errors, Add New Domains and Update to Latest API

Summary

Updated Uqload extractor to support additional domains and modernized implementation to match current Cloudstream ExtractorAPI standards.

Changes

1. New Domain Support

Added support for two additional Uqload mirror domains:

2. API Signature Update

Updated getUrl() method signature to match current ExtractorAPI specification:

Before:

override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>?

After:

override suspend fun getUrl(
    url: String,
    referer: String?,
    subtitleCallback: (SubtitleFile) -> Unit,
    callback: (ExtractorLink) -> Unit
)

3. Return Pattern Modernization

Changed from returning a list to using callback pattern:

Before:

return listOf(
    newExtractorLink(name, name, link) {
        this.referer = url
    }
)

After:

callback.invoke(
    newExtractorLink(
        source = name,
        name = name,
        url = link
    ) {
        this.referer = "$mainUrl/"
    }
)

4. Regex Pattern Fix

Corrected regex pattern to properly match Uqload's JavaScript structure:

Before: sources:.\\[(.*?)\\]
After: sources:.\["(.*?)"\]

The new pattern correctly captures URLs from arrays like: sources: ["https://..."]

5. Referer Standardization

Changed referer from dynamic url to consistent "$mainUrl/" for better compatibility.

Technical Details

  • Added imports: SubtitleFile, USER_AGENT, newSubtitleFile (prepared for future subtitle support)
  • Maintains backward compatibility with existing domains (uqload.com, uqload.co)
  • No breaking changes for providers using this extractor
  • Debug logging prepared (currently commented out)

Testing

  • ✅ Tested with uqload.cx .bz .co and .com

Notes

The original comment about ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED (3003) has been preserved, as this error occurs when the server returns "error_nofile" response, which is expected behavior for invalid/expired links.

Disclaimer: The generation of this PR was AI assisted, however the code is 100% human.

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.

1 participant