diff --git a/Trendyporn/src/main/kotlin/com/Tendyporn/TrendyPorn.kt b/Trendyporn/src/main/kotlin/com/Tendyporn/TrendyPorn.kt index 2828e22..6e67ee6 100644 --- a/Trendyporn/src/main/kotlin/com/Tendyporn/TrendyPorn.kt +++ b/Trendyporn/src/main/kotlin/com/Tendyporn/TrendyPorn.kt @@ -1,4 +1,4 @@ -package com.Trendyporn +package com.owencz1998 import org.jsoup.nodes.Element import com.lagradost.cloudstream3.* @@ -71,7 +71,6 @@ class TrendyPorn : MainAPI() { "${mainUrl}/channels/43/vintage/" to "Vintage", "${mainUrl}/channels/43/webcams/" to "Webcams", "${mainUrl}/channels/45/wife/" to "Wife" - ) override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { @@ -115,8 +114,8 @@ class TrendyPorn : MainAPI() { override suspend fun load(url: String): LoadResponse { val document = app.get(url).document - val title = document.selectFirst("meta[property=og:title]").attr("content") - val posterUrl = fixUrlNull(document.selectFirst("meta[property=og:image]").attr("content")) + val title = document.selectFirst("meta[property=og:title]")?.attr("content") ?:"" + val posterUrl = fixUrlNull(document.selectFirst("meta[property=og:image]")?.attr("content")) ?:"" return newMovieLoadResponse(title, url, TvType.NSFW, url) { this.posterUrl = posterUrl @@ -131,7 +130,7 @@ class TrendyPorn : MainAPI() { ): Boolean { val document = app.get(data).document - val link = document.selectFirst("source").attr("src") + val link = document.selectFirst("source")?.attr("src") ?:"" callback.invoke( ExtractorLink( @@ -144,4 +143,4 @@ class TrendyPorn : MainAPI() { ) return true } -} +} \ No newline at end of file