Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.lagradost.cloudstream3.extractors

import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.Prerelease
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.ExtractorLinkType
import com.lagradost.cloudstream3.utils.newExtractorLink
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Prerelease
class Playmate : ExtractorApi() {
override val name: String = "Playmate"
override val mainUrl: String = "https://playmate.to"
override val requiresReferer: Boolean = false

override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val id = url.substringAfterLast("/")

val resp = app.post(
"$mainUrl/api/s",
json = mapOf("c" to id, "d" to "web"),
headers = mapOf("User-Agent" to "Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0")
).parsed<StreamInfo>()

callback.invoke(newExtractorLink(source = name, name = name, url = resp.sx, type = ExtractorLinkType.M3U8))
}

@Serializable
private data class StreamInfo(
@SerialName("sx")
@JsonProperty("sx")
val sx: String,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ import com.lagradost.cloudstream3.extractors.PlayLtXyz
import com.lagradost.cloudstream3.extractors.PlayRu
import com.lagradost.cloudstream3.extractors.PlayerVoxzer
import com.lagradost.cloudstream3.extractors.Playerwish
import com.lagradost.cloudstream3.extractors.Playmate
import com.lagradost.cloudstream3.extractors.Playmogo
import com.lagradost.cloudstream3.extractors.Rabbitstream
import com.lagradost.cloudstream3.extractors.RapidVid
Expand Down Expand Up @@ -1320,6 +1321,7 @@ val extractorApis: AtomicMutableList<ExtractorApi> = atomicListOf(
Flyfile(),
Firestream(),
Vids(),
Playmate()
)


Expand Down