forked from recloudstream/cloudstream
parent
602429ea8b
commit
a241bed56c
1 changed files with 6 additions and 9 deletions
|
@ -1,6 +1,5 @@
|
||||||
package com.lagradost.cloudstream3.animeproviders
|
package com.lagradost.cloudstream3.animeproviders
|
||||||
|
|
||||||
import android.util.Log
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
||||||
|
@ -90,12 +89,10 @@ class OploverzProvider : MainAPI() {
|
||||||
|
|
||||||
private fun Element.toSearchResult(): AnimeSearchResponse {
|
private fun Element.toSearchResult(): AnimeSearchResponse {
|
||||||
val href = getProperAnimeLink(this.selectFirst("a.tip")!!.attr("href"))
|
val href = getProperAnimeLink(this.selectFirst("a.tip")!!.attr("href"))
|
||||||
val title = this.selectFirst("h2[itemprop=headline]")!!.text().trim()
|
val title = this.selectFirst("h2[itemprop=headline]")?.text()?.trim() ?: ""
|
||||||
val posterUrl = fixUrl(this.selectFirst("img")!!.attr("src"))
|
val posterUrl = fixUrlNull(this.selectFirst("img")?.attr("src"))
|
||||||
val type = getType(this.selectFirst(".eggtype, .typez")!!.text().trim())
|
val type = getType(this.selectFirst(".eggtype, .typez")?.text()?.trim().toString())
|
||||||
val epNum =
|
val epNum = this.selectFirst(".eggepisode, span.epx")?.text()?.replace(Regex("[^0-9]"), "")?.trim()?.toIntOrNull()
|
||||||
this.selectFirst(".eggepisode, span.epx")!!.text().replace(Regex("[^0-9]"), "").trim()
|
|
||||||
.toIntOrNull()
|
|
||||||
|
|
||||||
return newAnimeSearchResponse(title, href, type) {
|
return newAnimeSearchResponse(title, href, type) {
|
||||||
this.posterUrl = posterUrl
|
this.posterUrl = posterUrl
|
||||||
|
@ -108,8 +105,8 @@ class OploverzProvider : MainAPI() {
|
||||||
val document = app.get(link).document
|
val document = app.get(link).document
|
||||||
|
|
||||||
return document.select("article[itemscope=itemscope]").map {
|
return document.select("article[itemscope=itemscope]").map {
|
||||||
val title = it.selectFirst(".tt")!!.ownText().trim()
|
val title = it.selectFirst(".tt")?.ownText()?.trim().toString()
|
||||||
val poster = it.selectFirst("img")!!.attr("src")
|
val poster = fixUrlNull(it.selectFirst("img")?.attr("src"))
|
||||||
val tvType = getType(it.selectFirst(".typez")?.text().toString())
|
val tvType = getType(it.selectFirst(".typez")?.text().toString())
|
||||||
val href = fixUrl(it.selectFirst("a.tip")!!.attr("href"))
|
val href = fixUrl(it.selectFirst("a.tip")!!.attr("href"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue