File tree Expand file tree Collapse file tree
PikaHD/src/main/kotlin/com/pikahd Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.utils.*
88import com.lagradost.cloudstream3.extractors.StreamTape
99import com.lagradost.cloudstream3.extractors.StreamWishExtractor
1010import com.lagradost.cloudstream3.amap
11+ import com.lagradost.cloudstream3.LoadResponse.Companion.addImdbId
1112import org.jsoup.Jsoup
1213import java.net.URI
1314import java.net.URLDecoder
@@ -317,6 +318,12 @@ class PikaHDProvider : MainAPI() {
317318 val seasonNumber = seasonMatch?.groupValues?.get(1 )?.toIntOrNull() ? : 1
318319
319320 val soup = Jsoup .parse(postContentHtml)
321+ val imdbId = soup.select(" a[href*=\" imdb.com/title/\" ]" )
322+ .attr(" href" )
323+ .substringAfter(" /title/" )
324+ .substringBefore(" /" )
325+ .trim()
326+ .takeIf { it.isNotBlank() }
320327
321328 var currentEp: Int? = null
322329 var hasExplicitEpisodes = false
@@ -403,6 +410,7 @@ class PikaHDProvider : MainAPI() {
403410 return newMovieLoadResponse(cleanName, url, TvType .Movie , dataJson) {
404411 this .posterUrl = poster
405412 this .plot = plotText
413+ addImdbId(imdbId)
406414 }
407415 } else {
408416 val episodesList = mutableListOf<Episode >()
@@ -422,6 +430,7 @@ class PikaHDProvider : MainAPI() {
422430 return newTvSeriesLoadResponse(cleanName, url, TvType .TvSeries , episodesList) {
423431 this .posterUrl = poster
424432 this .plot = plotText
433+ addImdbId(imdbId)
425434 }
426435 }
427436 }
You can’t perform that action at this time.
0 commit comments