More fixes (#1470)
This commit is contained in:
@ -6,7 +6,7 @@ ext {
|
|||||||
extName = 'GoogleDriveIndex'
|
extName = 'GoogleDriveIndex'
|
||||||
pkgNameSuffix = 'all.googledriveindex'
|
pkgNameSuffix = 'all.googledriveindex'
|
||||||
extClass = '.GoogleDriveIndex'
|
extClass = '.GoogleDriveIndex'
|
||||||
extVersionCode = 3
|
extVersionCode = 4
|
||||||
libVersion = '13'
|
libVersion = '13'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,15 +431,28 @@ class GoogleDriveIndex : ConfigurableAnimeSource, AnimeHttpSource() {
|
|||||||
).execute().asJsoup()
|
).execute().asJsoup()
|
||||||
|
|
||||||
val script = doc.selectFirst("script:containsData(videodomain)")?.data()
|
val script = doc.selectFirst("script:containsData(videodomain)")?.data()
|
||||||
|
?: doc.selectFirst("script:containsData(downloaddomain)")?.data()
|
||||||
?: return Observable.just(listOf(Video(url, "Video", url)))
|
?: return Observable.just(listOf(Video(url, "Video", url)))
|
||||||
val domainUrl = script.substringAfter("\"videodomain\":\"").substringBefore("\"")
|
|
||||||
|
val domainUrl = if (script.contains("videodomain", true)) {
|
||||||
|
script
|
||||||
|
.substringAfter("\"videodomain\":\"")
|
||||||
|
.substringBefore("\"")
|
||||||
|
} else {
|
||||||
|
script
|
||||||
|
.substringAfter("\"downloaddomain\":\"")
|
||||||
|
.substringBefore("\"")
|
||||||
|
}
|
||||||
|
|
||||||
val videoUrl = if (domainUrl.isBlank()) {
|
val videoUrl = if (domainUrl.isBlank()) {
|
||||||
url
|
url
|
||||||
} else {
|
} else {
|
||||||
domainUrl + url.toHttpUrl().encodedPath
|
domainUrl + url.toHttpUrl().encodedPath
|
||||||
}
|
}
|
||||||
|
|
||||||
return Observable.just(listOf(Video(videoUrl, "Video", videoUrl)))
|
return Observable.just(
|
||||||
|
listOf(Video(videoUrl, "Video", videoUrl)),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================= Utilities ==============================
|
// ============================= Utilities ==============================
|
||||||
|
Reference in New Issue
Block a user