[Sora] added BollyMaza

This commit is contained in:
hexated 2023-01-05 00:45:21 +07:00
parent 6f1c38b83a
commit a31958c72b
2 changed files with 56 additions and 8 deletions

View file

@ -1610,6 +1610,32 @@ object SoraExtractor : SoraStream() {
} }
suspend fun invokeMoviezAdd( suspend fun invokeMoviezAdd(
apiUrl: String? = null,
api: String? = null,
title: String? = null,
year: Int? = null,
season: Int? = null,
episode: Int? = null,
callback: (ExtractorLink) -> Unit
) {
invokeBloginguru(apiUrl, api, title, year, season, episode, callback)
}
suspend fun invokeBollyMaza(
apiUrl: String? = null,
api: String? = null,
title: String? = null,
year: Int? = null,
season: Int? = null,
episode: Int? = null,
callback: (ExtractorLink) -> Unit
) {
invokeBloginguru(apiUrl, api, title, year, season, episode, callback)
}
private suspend fun invokeBloginguru(
apiUrl: String? = null,
api: String? = null,
title: String? = null, title: String? = null,
year: Int? = null, year: Int? = null,
season: Int? = null, season: Int? = null,
@ -1617,7 +1643,7 @@ object SoraExtractor : SoraStream() {
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
) { ) {
val fixTitle = title?.fixTitle()?.replace("-", " ") val fixTitle = title?.fixTitle()?.replace("-", " ")
val doc = app.get("$moviezAddAPI/?s=$fixTitle").document val doc = app.get("$apiUrl/?s=$fixTitle").document
val matchMedia = doc.select("article.mh-loop-item").map { val matchMedia = doc.select("article.mh-loop-item").map {
it.select("a").attr("href") to it.select("a").text() it.select("a").attr("href") to it.select("a").text()
@ -1636,7 +1662,7 @@ object SoraExtractor : SoraStream() {
?.split("|") ?.split("|")
?.map { it.trim() } ?.map { it.trim() }
val iframe = if (season == null) { val iframe = (if (season == null) {
media?.mapIndexed { index, name -> media?.mapIndexed { index, name ->
detailDoc.select("div.entry-content > pre")[index.plus(1)].selectFirst("a") detailDoc.select("div.entry-content > pre")[index.plus(1)].selectFirst("a")
?.attr("href") to name ?.attr("href") to name
@ -1651,7 +1677,7 @@ object SoraExtractor : SoraStream() {
).document.selectFirst("div.entry-content strong:matches((?i)S0?${season}E0?${episode}) a") ).document.selectFirst("div.entry-content strong:matches((?i)S0?${season}E0?${episode}) a")
?.attr("href") to name ?.attr("href") to name
} }
} })?.filter { it?.first?.startsWith("http") == true }
iframe?.apmap { iframe?.apmap {
val token = app.get( val token = app.get(
@ -1670,8 +1696,8 @@ object SoraExtractor : SoraStream() {
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
"MoviezAdd $qualityName", "$api $qualityName",
"MoviezAdd $qualityName", "$api $qualityName",
shortLink ?: return@apmap null, shortLink ?: return@apmap null,
"", "",
quality ?: Qualities.Unknown.value quality ?: Qualities.Unknown.value

View file

@ -2,6 +2,7 @@ package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.hexated.SoraExtractor.invoke123Movie import com.hexated.SoraExtractor.invoke123Movie
import com.hexated.SoraExtractor.invokeBollyMaza
import com.hexated.SoraExtractor.invokeDbgo import com.hexated.SoraExtractor.invokeDbgo
import com.hexated.SoraExtractor.invokeFilmxy import com.hexated.SoraExtractor.invokeFilmxy
import com.hexated.SoraExtractor.invokeFlixhq import com.hexated.SoraExtractor.invokeFlixhq
@ -88,7 +89,8 @@ open class SoraStream : TmdbProvider() {
const val fdMoviesAPI = "https://freedrivemovie.com" const val fdMoviesAPI = "https://freedrivemovie.com"
const val m4uhdAPI = "https://m4uhd.tv" const val m4uhdAPI = "https://m4uhd.tv"
const val tvMoviesAPI = "https://www.tvseriesnmovies.com" const val tvMoviesAPI = "https://www.tvseriesnmovies.com"
const val moviezAddAPI = "https://moviezaddiction.bloginguru.info" const val moviezAddAPI = "https://m.bloginguru.info"
const val bollyMazaAPI = "https://b.bloginguru.info"
const val moviesbayAPI = "https://moviesbay.live" const val moviesbayAPI = "https://moviesbay.live"
fun getType(t: String?): TvType { fun getType(t: String?): TvType {
@ -147,7 +149,8 @@ open class SoraStream : TmdbProvider() {
page: Int, page: Int,
request: MainPageRequest request: MainPageRequest
): HomePageResponse { ): HomePageResponse {
val adultQuery = if (settingsForProvider.enableAdult) "" else "&without_keywords=190370|13059|226161|195669" val adultQuery =
if (settingsForProvider.enableAdult) "" else "&without_keywords=190370|13059|226161|195669"
val type = if (request.data.contains("/movie")) "movie" else "tv" val type = if (request.data.contains("/movie")) "movie" else "tv"
val home = app.get("${request.data}$adultQuery&page=$page") val home = app.get("${request.data}$adultQuery&page=$page")
.parsedSafe<Results>()?.results .parsedSafe<Results>()?.results
@ -363,7 +366,13 @@ open class SoraStream : TmdbProvider() {
) )
}, },
{ {
if (!res.isAnime) invokeHDMovieBox(res.title, res.season, res.episode, subtitleCallback, callback) if (!res.isAnime) invokeHDMovieBox(
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
}, },
{ {
invokeSeries9(res.title, res.season, res.episode, subtitleCallback, callback) invokeSeries9(res.title, res.season, res.episode, subtitleCallback, callback)
@ -482,6 +491,8 @@ open class SoraStream : TmdbProvider() {
}, },
{ {
if (!res.isAnime) invokeMoviezAdd( if (!res.isAnime) invokeMoviezAdd(
moviezAddAPI,
"MoviezAdd",
res.title, res.title,
res.year, res.year,
res.season, res.season,
@ -489,6 +500,17 @@ open class SoraStream : TmdbProvider() {
callback callback
) )
}, },
{
if (!res.isAnime) invokeBollyMaza(
bollyMazaAPI,
"BollyMaza",
res.title,
res.year,
res.season,
res.episode,
callback
)
}
) )
return true return true