New Source NoodleMagazine
This commit is contained in:
parent
8d30295490
commit
d7deb25fd1
|
@ -0,0 +1,24 @@
|
||||||
|
version = 7
|
||||||
|
|
||||||
|
|
||||||
|
cloudstream {
|
||||||
|
language = "en"
|
||||||
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
|
description = "type .nofap in discord - Full Length"
|
||||||
|
authors = listOf("KillerDogeEmpire, Coxju")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status int as the following:
|
||||||
|
* 0: Down
|
||||||
|
* 1: Ok
|
||||||
|
* 2: Slow
|
||||||
|
* 3: Beta only
|
||||||
|
* */
|
||||||
|
status = 1 // will be 3 if unspecified
|
||||||
|
tvTypes = listOf(
|
||||||
|
"NSFW",
|
||||||
|
)
|
||||||
|
|
||||||
|
iconUrl = "https://www.google.com/s2/favicons?domain=noodlemagazine.com/&sz=%size%"
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest package="com.KillerDogeEmpire"/>
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.KillerDogeEmpire
|
||||||
|
|
||||||
|
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
|
||||||
|
import com.lagradost.cloudstream3.plugins.Plugin
|
||||||
|
import android.content.Context
|
||||||
|
|
||||||
|
@CloudstreamPlugin
|
||||||
|
class NoodleMagazinePlugin: Plugin() {
|
||||||
|
override fun load(context: Context) {
|
||||||
|
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||||
|
registerMainAPI(NoodleMagazineProvider())
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,120 @@
|
||||||
|
package com.KillerDogeEmpire
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
import com.lagradost.cloudstream3.*
|
||||||
|
import com.lagradost.cloudstream3.network.WebViewResolver
|
||||||
|
import com.lagradost.cloudstream3.utils.*
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
|
class NoodleMagazineProvider : MainAPI() { // all providers must be an instance of MainAPI
|
||||||
|
override var mainUrl = "https://noodlemagazine.com"
|
||||||
|
override var name = "Noodle Magazine"
|
||||||
|
override val hasMainPage = true
|
||||||
|
override var lang = "en"
|
||||||
|
override val hasDownloadSupport = true
|
||||||
|
override val supportedTypes = setOf(
|
||||||
|
TvType.NSFW
|
||||||
|
)
|
||||||
|
|
||||||
|
override val mainPage = mainPageOf(
|
||||||
|
"latest" to "Latest",
|
||||||
|
"onlyfans" to "Onlyfans",
|
||||||
|
"latina" to "Latina",
|
||||||
|
"blonde" to "Blonde",
|
||||||
|
"milf" to "MILF",
|
||||||
|
"jav" to "JAV",
|
||||||
|
"hentai" to "Hentai",
|
||||||
|
"lesbian" to "Lesbian",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
|
||||||
|
val curpage = page - 1
|
||||||
|
val link = "$mainUrl/video/${request.data}?p=$curpage"
|
||||||
|
val document = app.get(link).document
|
||||||
|
val home = document.select("div.item").mapNotNull {
|
||||||
|
it.toSearchResult()
|
||||||
|
}
|
||||||
|
return newHomePageResponse(request.name, home)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun Element.toSearchResult(): AnimeSearchResponse? {
|
||||||
|
val href = fixUrl(this.selectFirst("a")?.attr("href") ?: return null)
|
||||||
|
val title = this.selectFirst("a div.i_info div.title")?.text() ?: return null
|
||||||
|
val posterUrl = fixUrlNull(this.selectFirst("a div.i_img img")?.attr("data-src"))
|
||||||
|
|
||||||
|
return newAnimeSearchResponse(title, href, TvType.Anime) {
|
||||||
|
this.posterUrl = posterUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun search(query: String): List<AnimeSearchResponse> {
|
||||||
|
val searchresult = mutableListOf<AnimeSearchResponse>()
|
||||||
|
(0..10).toList().apmap { page ->
|
||||||
|
val doc = app.get("$mainUrl/video/$query?p=$page").document
|
||||||
|
//return document.select("div.post-filter-image").mapNotNull {
|
||||||
|
doc.select("div.item").apmap { res ->
|
||||||
|
searchresult.add(res.toSearchResult()!!)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return searchresult
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun load(url: String): LoadResponse {
|
||||||
|
val document = app.get(url).document
|
||||||
|
val title = document.selectFirst("div.l_info h1")?.text()?.trim() ?: "null"
|
||||||
|
val poster =
|
||||||
|
document.selectFirst("""meta[property="og:image"]""")?.attr("content") ?: "null"
|
||||||
|
|
||||||
|
val recommendations = document.select("div.item").mapNotNull {
|
||||||
|
it.toSearchResult()
|
||||||
|
}
|
||||||
|
|
||||||
|
return newMovieLoadResponse(title, url, TvType.NSFW, url) {
|
||||||
|
this.posterUrl = poster
|
||||||
|
this.recommendations = recommendations
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override suspend fun loadLinks(
|
||||||
|
data: String,
|
||||||
|
isCasting: Boolean,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
): Boolean {
|
||||||
|
val jason = app.get(
|
||||||
|
data, interceptor = WebViewResolver(Regex("""/playlist/"""))
|
||||||
|
).parsed<SusJSON>()
|
||||||
|
val extlinkList = mutableListOf<ExtractorLink>()
|
||||||
|
jason.sources.map {
|
||||||
|
extlinkList.add(
|
||||||
|
ExtractorLink(
|
||||||
|
source = name,
|
||||||
|
name = name,
|
||||||
|
url = it.streamlink!!,
|
||||||
|
referer = "$mainUrl/",
|
||||||
|
quality = getQualityFromName(it.qualityfile)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
extlinkList.forEach(callback)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
data class SusJSON(
|
||||||
|
@JsonProperty("image") val img: String? = null,
|
||||||
|
@JsonProperty("sources") val sources: ArrayList<Streams> = arrayListOf()
|
||||||
|
)
|
||||||
|
|
||||||
|
data class Streams(
|
||||||
|
@JsonProperty("file") val streamlink: String? = null,//the link
|
||||||
|
@JsonProperty("label") val qualityfile: String? = null,//720 480 360 240
|
||||||
|
@JsonProperty("type") val type: String? = null,//mp4
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue