anime/indo: optimize detail page and domain

This commit is contained in:
helo 2023-09-11 22:25:05 +07:00
parent c6f89db48a
commit 7dabff1da9
22 changed files with 143 additions and 69 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 2
version = 3
cloudstream {

View file

@ -1,13 +1,15 @@
package com.hexated
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.*
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
class Animasu : MainAPI() {
override var mainUrl = "https://animasu.cc"
override var mainUrl = "https://animasu.uno"
override var name = "Animasu"
override val hasMainPage = true
override var lang = "id"
@ -99,7 +101,7 @@ class Animasu : MainAPI() {
val poster = document.selectFirst("div.bigcontent img")?.attr("src")?.replace("\n", "")
val table = document.selectFirst("div.infox div.spe")
val type = table?.selectFirst("span:contains(Jenis:)")?.ownText()
val type = getType(table?.selectFirst("span:contains(Jenis:)")?.ownText())
val year = table?.selectFirst("span:contains(Rilis:)")?.ownText()?.substringAfterLast(",")?.trim()?.toIntOrNull()
val status = table?.selectFirst("span:contains(Status:) font")?.text()
val trailer = document.selectFirst("div.trailer iframe")?.attr("src")
@ -107,17 +109,22 @@ class Animasu : MainAPI() {
val link = fixUrl(it.selectFirst("a")!!.attr("href"))
val name = it.selectFirst("a")?.text() ?: ""
val episode = Regex("Episode\\s?(\\d+)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull()
Episode(link, name, episode = episode)
Episode(link, episode = episode)
}.reversed()
return newAnimeLoadResponse(title, url, getType(type)) {
posterUrl = poster
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = getStatus(status)
plot = document.select("div.sinopsis p").text()
this.tags = table?.select("span:contains(Genre:) a")?.map { it.text() }
addTrailer(trailer)
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 13
version = 14
cloudstream {

View file

@ -1,6 +1,8 @@
package com.hexated
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.httpsify
@ -113,8 +115,8 @@ class AnimeIndoProvider : MainAPI() {
?.trim() ?: return null
val poster = document.selectFirst("div.thumb > img[itemprop=image]")?.attr("src")
val tags = document.select("div.genxed > a").map { it.text() }
val type = document.selectFirst("div.info-content > div.spe > span:contains(Type:)")?.ownText()
?.trim()?.lowercase() ?: "tv"
val type = getType(document.selectFirst("div.info-content > div.spe > span:contains(Type:)")?.ownText()
?.trim()?.lowercase() ?: "tv")
val year = document.selectFirst("div.info-content > div.spe > span:contains(Released:)")?.ownText()?.let {
Regex("\\d,\\s(\\d*)").find(it)?.groupValues?.get(1)?.toIntOrNull()
}
@ -126,16 +128,19 @@ class AnimeIndoProvider : MainAPI() {
val header = it.selectFirst("span.lchx > a") ?: return@mapNotNull null
val episode = header.text().trim().replace("Episode", "").trim().toIntOrNull()
val link = fixUrl(header.attr("href"))
Episode(link, header.text(), episode = episode)
Episode(link, episode = episode)
}.reversed()
val recommendations = document.select("div.relat div.animposx").mapNotNull {
it.toSearchResult()
}
return newAnimeLoadResponse(title, url, getType(type)) {
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
engName = title
posterUrl = poster
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = status
@ -143,6 +148,8 @@ class AnimeIndoProvider : MainAPI() {
this.tags = tags
this.recommendations = recommendations
addTrailer(trailer)
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 9
version = 10
cloudstream {

View file

@ -1,6 +1,8 @@
package com.hexated
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.mvvm.safeApiCall
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.ExtractorLinkType
@ -108,18 +110,21 @@ class AnimeSailProvider : MainAPI() {
val title = document.selectFirst("h1.entry-title")?.text().toString()
.replace("Subtitle Indonesia", "").trim()
val poster = document.selectFirst("div.entry-content > img")?.attr("src")
val type = document.select("tbody th:contains(Tipe)").next().text().lowercase()
val type = getType(document.select("tbody th:contains(Tipe)").next().text().lowercase())
val year = document.select("tbody th:contains(Dirilis)").next().text().trim().toIntOrNull()
val episodes = document.select("ul.daftar > li").map {
val link = fixUrl(it.select("a").attr("href"))
val name = it.select("a").text()
val episode = Regex("Episode\\s?(\\d+)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull()
Episode(link, name, episode = episode)
Episode(link, episode = episode)
}.reversed()
return newAnimeLoadResponse(title, url, getType(type)) {
posterUrl = poster
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus =
@ -127,6 +132,8 @@ class AnimeSailProvider : MainAPI() {
plot = document.selectFirst("div.entry-content > p")?.text()
this.tags =
document.select("tbody th:contains(Genre)").next().select("a").map { it.text() }
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 14
version = 15
cloudstream {

View file

@ -1,6 +1,8 @@
package com.hexated
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.mvvm.safeApiCall
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
@ -106,7 +108,6 @@ class KuramanimeProvider : MainAPI() {
document.select("div.anime__details__widget > div > div:nth-child(1) > ul > li:nth-child(3)")
.text().trim().replace("Status: ", "")
)
val type = document.selectFirst("div.col-lg-6.col-md-6 ul li:contains(Tipe:) a")?.text()?.lowercase() ?: "tv"
val description = document.select(".anime__details__text > p").text().trim()
val episodes = mutableListOf<Episode>()
@ -119,31 +120,36 @@ class KuramanimeProvider : MainAPI() {
val episode = Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0)
?.toIntOrNull()
val link = it.attr("href")
Episode(link, name, episode = episode)
Episode(link, episode = episode)
}
if(eps.isEmpty()) break else episodes.addAll(eps)
}
val type = getType(document.selectFirst("div.col-lg-6.col-md-6 ul li:contains(Tipe:) a")?.text()?.lowercase() ?: "tv", episodes.size)
val recommendations = document.select("div#randomList > a").mapNotNull {
val epHref = it.attr("href")
val epTitle = it.select("h5.sidebar-title-h5.px-2.py-2").text()
val epPoster = it.select(".product__sidebar__view__item.set-bg").attr("data-setbg")
newAnimeSearchResponse(epTitle, epHref, TvType.Anime) {
this.posterUrl = epPoster
addDubStatus(dubExist = false, subExist = true)
}
}
return newAnimeLoadResponse(title, url, getType(type, episodes.size)) {
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
engName = title
posterUrl = poster
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = status
plot = description
this.tags = tags
this.recommendations = recommendations
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 15
version = 16
cloudstream {

View file

@ -2,6 +2,8 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.extractors.helper.AesHelper
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
@ -130,8 +132,8 @@ class KuronimeProvider : MainAPI() {
val poster = document.selectFirst("div.l[itemprop=image] > img")?.attr("data-src")
val tags = document.select(".infodetail > ul > li:nth-child(2) > a").map { it.text() }
val type =
document.selectFirst(".infodetail > ul > li:nth-child(7)")?.ownText()?.removePrefix(":")
?.lowercase()?.trim() ?: "tv"
getType(document.selectFirst(".infodetail > ul > li:nth-child(7)")?.ownText()?.removePrefix(":")
?.lowercase()?.trim() ?: "tv")
val trailer = document.selectFirst("div.tply iframe")?.attr("data-src")
val year = Regex("\\d, (\\d*)").find(
@ -148,18 +150,23 @@ class KuronimeProvider : MainAPI() {
val name = it.selectFirst("a")?.text() ?: return@mapNotNull null
val episode =
Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull()
Episode(link, name, episode = episode)
Episode(link, episode = episode)
}.reversed()
return newAnimeLoadResponse(title, url, getType(type)) {
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
engName = title
posterUrl = poster
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = status
plot = description
addTrailer(trailer)
this.tags = tags
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 7
version = 8
cloudstream {

View file

@ -1,6 +1,8 @@
package com.hexated
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor
@ -8,7 +10,7 @@ import org.jsoup.nodes.Element
import java.net.URI
class NeonimeProvider : MainAPI() {
override var mainUrl = "https://neonime.fun"
override var mainUrl = "https://neonime.ink"
private var baseUrl = mainUrl
override var name = "Neonime"
override val hasQuickSearch = false
@ -120,13 +122,17 @@ class NeonimeProvider : MainAPI() {
val mPoster = document.selectFirst(".sbox > .imagen > .fix > img[itemprop = image]")?.attr("data-src")
val mTrailer = document.selectFirst("div.youtube_id iframe")?.attr("data-wpfc-original-src")?.substringAfterLast("html#")?.let{ "https://www.youtube.com/embed/$it"}
val year = document.selectFirst("a[href*=release-year]")!!.text().toIntOrNull()
val tracker = APIHolder.getTracker(listOf(mTitle),TrackerType.getTypes(TvType.Movie),year,true)
return newMovieLoadResponse(name = mTitle, url = url, type = TvType.Movie, dataUrl = url) {
posterUrl = mPoster
posterUrl = tracker?.image ?: mPoster
backgroundPosterUrl = tracker?.cover
this.year = year
plot = document.select("div[itemprop = description]").text().trim()
rating = document.select("span[itemprop = ratingValue]").text().toIntOrNull()
tags = document.select("p.meta_dd > a").map { it.text() }
addTrailer(mTrailer)
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}
else {
@ -138,18 +144,21 @@ class NeonimeProvider : MainAPI() {
val link = fixUrl(it.selectFirst(".episodiotitle > a")!!.attr("href"))
val name = it.selectFirst(".episodiotitle > a")?.ownText().toString()
val episode = Regex("(\\d+[.,]?\\d*)").find(name)?.groupValues?.getOrNull(0)?.toIntOrNull()
Episode(link, name, episode = episode)
Episode(link, episode = episode)
}.reversed()
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(TvType.Anime),year,true)
return newAnimeLoadResponse(title, url, TvType.Anime) {
engName = title
posterUrl = poster
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = getStatus(document.select("div.metadatac > span").last()!!.text().trim())
plot = document.select("div[itemprop = description] > p").text().trim()
tags = document.select("#info a[href*=\"-genre/\"]").map { it.text() }
addTrailer(trailer)
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 4
version = 5
cloudstream {

View file

@ -2,6 +2,8 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
@ -96,15 +98,15 @@ class Nimegami : MainAPI() {
val year = table.getContent("Musim / Rilis").text().filter { it.isDigit() }.toIntOrNull()
val status = getStatus(document.selectFirst("h1[itemprop=headline]")?.text())
val type = table.getContent("Type").text()
val type = getType(table.getContent("Type").text())
val description = document.select("div#Sinopsis p").text().trim()
val trailer = document.selectFirst("div#Trailer iframe")?.attr("src")
val episodes = document.select("div.list_eps_stream li")
.mapNotNull {
val name = it.text()
val episode = Regex("Episode\\s?(\\d+)").find(it.text())?.groupValues?.getOrNull(0)?.toIntOrNull()
val link = it.attr("data")
Episode(link, name)
Episode(link, episode = episode)
}
val recommendations = document.select("div#randomList > a").mapNotNull {
@ -118,10 +120,12 @@ class Nimegami : MainAPI() {
}
}
return newAnimeLoadResponse(title, url, getType(type)) {
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
engName = title
posterUrl = poster
backgroundPosterUrl = bgPoster
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover ?: bgPoster
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = status
@ -129,6 +133,8 @@ class Nimegami : MainAPI() {
this.tags = tags
this.recommendations = recommendations
addTrailer(trailer)
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 16
version = 17
cloudstream {

View file

@ -2,6 +2,8 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.extractors.Hxfile
import com.lagradost.cloudstream3.utils.ExtractorLink
@ -11,7 +13,7 @@ import org.jsoup.nodes.Element
import java.net.URI
class NontonAnimeIDProvider : MainAPI() {
override var mainUrl = "https://nontonanimeid.lol"
override var mainUrl = "https://nontonanimeid.top"
override var name = "NontonAnimeID"
override val hasQuickSearch = false
override val hasMainPage = true
@ -130,7 +132,7 @@ class NontonAnimeIDProvider : MainAPI() {
val status = getStatus(
document.select("span.statusseries").text().trim()
)
val type = document.select("span.typeseries").text().trim().lowercase()
val type = getType(document.select("span.typeseries").text().trim().lowercase())
val rating = document.select("span.nilaiseries").text().trim().toIntOrNull()
val description = document.select(".entry-content.seriesdesc > p").text().trim()
val trailer = document.selectFirst("a.trailerbutton")?.attr("href")
@ -167,21 +169,22 @@ class NontonAnimeIDProvider : MainAPI() {
}.reversed()
}
val recommendations = document.select(".result > li").mapNotNull {
val epHref = it.selectFirst("a")!!.attr("href")
val epTitle = it.selectFirst("h3")!!.text()
val epPoster = it.select(".top > img").attr("data-src")
newAnimeSearchResponse(epTitle, epHref, TvType.Anime) {
this.posterUrl = epPoster
addDubStatus(dubExist = false, subExist = true)
}
}
return newAnimeLoadResponse(title, url, getType(type)) {
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
engName = title
posterUrl = poster
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = status
@ -190,6 +193,8 @@ class NontonAnimeIDProvider : MainAPI() {
addTrailer(trailer)
this.tags = tags
this.recommendations = recommendations
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 23
version = 24
cloudstream {

View file

@ -1,7 +1,8 @@
package com.hexated
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.extractors.Filesim
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.utils.*
import org.jsoup.nodes.Element
@ -113,18 +114,21 @@ class OploverzProvider : MainAPI() {
val title = document.selectFirst("h1.entry-title")?.text()
?.replace("Subtitle Indonesia", "")?.trim() ?: ""
val type = document.selectFirst("div.alternati span.type")?.text() ?: ""
val type = getType(document.selectFirst("div.alternati span.type")?.text() ?: "")
val year = document.selectFirst("div.alternati a")?.text()?.filter { it.isDigit() }?.toIntOrNull()
val episodes = document.select("div.lstepsiode.listeps ul li").mapNotNull {
val header = it.selectFirst("a") ?: return@mapNotNull null
val episode = header.text().trim().toIntOrNull()
val link = fixUrl(header.attr("href"))
Episode(link, header.text(), episode = episode)
Episode(link, episode = episode)
}.reversed()
return newAnimeLoadResponse(title, url, getType(type)) {
posterUrl = document.selectFirst("div.thumb > img")?.attr("src")
this.year = document.selectFirst("div.alternati a")?.text()?.filter { it.isDigit() }?.toIntOrNull()
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
posterUrl = tracker?.image ?: document.selectFirst("div.thumb > img")?.attr("src")
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus =
getStatus(
@ -133,6 +137,8 @@ class OploverzProvider : MainAPI() {
plot = document.selectFirst("div.entry-content > p")?.text()?.trim()
this.tags =
document.select("div.genre-info a").map { it.text() }
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 14
version = 15
cloudstream {

View file

@ -2,6 +2,8 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.extractors.JWPlayer
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
@ -94,8 +96,8 @@ class OtakudesuProvider : MainAPI() {
?.replace(":", "")?.trim().toString()
val poster = document.selectFirst("div.fotoanime > img")?.attr("src")
val tags = document.select("div.infozingle > p:nth-child(11) > span > a").map { it.text() }
val type = document.selectFirst("div.infozingle > p:nth-child(5) > span")?.ownText()
?.replace(":", "")?.trim() ?: "tv"
val type = getType(document.selectFirst("div.infozingle > p:nth-child(5) > span")?.ownText()
?.replace(":", "")?.trim() ?: "tv")
val year = Regex("\\d, (\\d*)").find(
document.select("div.infozingle > p:nth-child(9) > span").text()
@ -112,7 +114,7 @@ class OtakudesuProvider : MainAPI() {
val episode = Regex("Episode\\s?(\\d+)").find(name)?.groupValues?.getOrNull(0)
?: it.selectFirst("a")?.text()
val link = fixUrl(it.selectFirst("a")!!.attr("href"))
Episode(link, name, episode = episode?.toIntOrNull())
Episode(link, episode = episode?.toIntOrNull())
}.reversed()
val recommendations =
@ -125,15 +127,20 @@ class OtakudesuProvider : MainAPI() {
}
}
return newAnimeLoadResponse(title, url, getType(type)) {
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
engName = title
posterUrl = poster
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = status
plot = description
this.tags = tags
this.recommendations = recommendations
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 14
version = 15
cloudstream {

View file

@ -1,6 +1,8 @@
package com.hexated
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
@ -8,7 +10,7 @@ import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.nodes.Element
class Samehadaku : MainAPI() {
override var mainUrl = "https://samehadaku.world"
override var mainUrl = "https://samehadaku.bond"
override var name = "Samehadaku"
override val hasMainPage = true
override var lang = "id"
@ -111,8 +113,8 @@ class Samehadaku : MainAPI() {
document.selectFirst("div.spe > span:contains(Status)")?.ownText() ?: return null
)
val type =
document.selectFirst("div.spe > span:contains(Type)")?.ownText()?.trim()?.lowercase()
?: "tv"
getType(document.selectFirst("div.spe > span:contains(Type)")?.ownText()?.trim()?.lowercase()
?: "tv")
val rating = document.selectFirst("span.ratingValue")?.text()?.trim()?.toRatingInt()
val description = document.select("div.desc p").text().trim()
val trailer = document.selectFirst("div.trailer-anime iframe")?.attr("src")
@ -129,9 +131,12 @@ class Samehadaku : MainAPI() {
it.toSearchResult()
}
return newAnimeLoadResponse(title, url, getType(type)) {
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
return newAnimeLoadResponse(title, url, type) {
engName = title
posterUrl = poster
posterUrl = tracker?.image ?: poster
backgroundPosterUrl = tracker?.cover
this.year = year
addEpisodes(DubStatus.Subbed, episodes)
showStatus = status
@ -140,6 +145,8 @@ class Samehadaku : MainAPI() {
addTrailer(trailer)
this.tags = tags
this.recommendations = recommendations
addMalId(tracker?.malId)
addAniListId(tracker?.aniId?.toIntOrNull())
}
}