trailer in cineblog01

This commit is contained in:
antonydp 2022-11-02 18:05:40 +01:00 committed by GitHub
parent 0856de2f6b
commit 101521835a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View file

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

View file

@ -1,6 +1,7 @@
package com.lagradost
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor
@ -83,6 +84,10 @@ class CineBlog01Provider : MainAPI() {
val dataUrl = document.select("ul.mirrors-list__list > li").map {
it.select("a").attr("href")
}.drop(1).joinToString (",")
val trailerUrl =
document.select("iframe").firstOrNull { it.attr("src").contains("youtube") }?.attr("src")
?.let { fixUrl(it) }
return newMovieLoadResponse(
title,
url,
@ -93,6 +98,7 @@ class CineBlog01Provider : MainAPI() {
this.plot = description
this.year = year
this.posterUrl = poster
addTrailer(trailerUrl)
}
}