Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
owencz1998 authored Jan 10, 2025
1 parent 4d0ca22 commit 7318103
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Trendyporn/src/main/kotlin/com/Tendyporn/TrendyPorn.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.Trendyporn
package com.owencz1998

import org.jsoup.nodes.Element
import com.lagradost.cloudstream3.*
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -144,4 +143,4 @@ class TrendyPorn : MainAPI() {
)
return true
}
}
}

0 comments on commit 7318103

Please sign in to comment.