updates on animension and dramacool (#837)
* added new server domain for streamsb * added new server domain for streamsb * added new server domain for streamsb Co-authored-by: notLaww <97511605+Lawwwwwwww@users.noreply.github.com>
This commit is contained in:
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'Animension'
|
||||
pkgNameSuffix = 'en.animension'
|
||||
extClass = '.Animension'
|
||||
extVersionCode = 2
|
||||
extVersionCode = 3
|
||||
libVersion = '13'
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ class Animension() : ConfigurableAnimeSource, AnimeHttpSource() {
|
||||
url.contains("sbplay2.com") || url.contains("japopav.tv") || url.contains("viewsb.com") ||
|
||||
url.contains("sbfast") || url.contains("sbfull.com") || url.contains("javplaya.com") ||
|
||||
url.contains("ssbstream.net") || url.contains("p1ayerjavseen.com") || url.contains("sbthe.com") ||
|
||||
url.contains("streamsss.net") // || url.contains("") // || url.contains("")
|
||||
url.contains("streamsss.net") || url.contains("sbplay2.xyz") // || url.contains("")
|
||||
-> {
|
||||
val headers = headers.newBuilder()
|
||||
.set("Referer", url)
|
||||
@ -146,7 +146,10 @@ class Animension() : ConfigurableAnimeSource, AnimeHttpSource() {
|
||||
url.contains("vidcloud.fun") || url.contains("fplayer.info") || // url.contains("") ||
|
||||
url.contains("diasfem.com") || url.contains("javpoll.com") // url.contains("")
|
||||
-> {
|
||||
FembedExtractor().videosFromUrl(url)?.let { videoList.addAll(it) }
|
||||
val videos = FembedExtractor().videosFromUrl(url)
|
||||
if (videos != null) {
|
||||
videoList.addAll(videos)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ ext {
|
||||
extName = 'DramaCool'
|
||||
pkgNameSuffix = 'en.dramacool'
|
||||
extClass = '.DramaCool'
|
||||
extVersionCode = 20
|
||||
extVersionCode = 21
|
||||
libVersion = '13'
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ class DramaCool : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
url.contains("sbplay2.com") || url.contains("japopav.tv") || url.contains("viewsb.com") ||
|
||||
url.contains("sbfast") || url.contains("sbfull.com") || url.contains("javplaya.com") ||
|
||||
url.contains("ssbstream.net") || url.contains("p1ayerjavseen.com") || url.contains("sbthe.com") ||
|
||||
url.contains("streamsss.net") // || url.contains("") // || url.contains("")
|
||||
url.contains("streamsss.net") || url.contains("sbplay2.xyz") // || url.contains("")
|
||||
-> {
|
||||
val headers = headers.newBuilder()
|
||||
.set("Referer", url)
|
||||
@ -145,7 +145,9 @@ class DramaCool : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
url.contains("diasfem.com") || url.contains("javpoll.com") // url.contains("")
|
||||
-> {
|
||||
val videos = FembedExtractor().videosFromUrl(url)
|
||||
videoList.addAll(videos)
|
||||
if (videos != null) {
|
||||
videoList.addAll(videos)
|
||||
}
|
||||
}
|
||||
|
||||
url.contains("streamtape") -> {
|
||||
@ -176,6 +178,7 @@ class DramaCool : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
newList.add(video)
|
||||
}
|
||||
}
|
||||
return newList
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
@ -6,25 +6,23 @@ import org.jsoup.Connection
|
||||
import org.jsoup.Jsoup
|
||||
|
||||
class FembedExtractor {
|
||||
fun videosFromUrl(url: String): List<Video> {
|
||||
|
||||
fun videosFromUrl(url: String): List<Video>? {
|
||||
val videoApi = url.replace("/v/", "/api/source/")
|
||||
val json = JSONObject(Jsoup.connect(videoApi).ignoreContentType(true).method(Connection.Method.POST).execute().body())
|
||||
val videoList = mutableListOf<Video>()
|
||||
if (json.getBoolean("success")) {
|
||||
val videoList = mutableListOf<Video>()
|
||||
|
||||
return if (json.getBoolean("success")) {
|
||||
val jsonArray = json.getJSONArray("data")
|
||||
for (i in 0 until jsonArray.length()) {
|
||||
val `object` = jsonArray.getJSONObject(i)
|
||||
val videoUrl = `object`.getString("file")
|
||||
val quality = "Fembed:" + `object`.getString("label")
|
||||
val quality = "Fembed: " + `object`.getString("label")
|
||||
videoList.add(Video(videoUrl, quality, videoUrl))
|
||||
}
|
||||
return videoList
|
||||
videoList
|
||||
} else {
|
||||
val videoUrl = "not used"
|
||||
val quality = "Video taken down for dmca"
|
||||
videoList.add(Video(videoUrl, quality, videoUrl))
|
||||
null
|
||||
}
|
||||
return videoList
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user