mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fix Linkbox
This commit is contained in:
parent
5826ae2301
commit
422770ae19
1 changed files with 3 additions and 1 deletions
|
@ -18,7 +18,8 @@ open class Linkbox : ExtractorApi() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val id = Regex("""(?:/f/|/file/|\?id=)(\w+)""").find(url)?.groupValues?.get(1)
|
val token = Regex("""(?:/f/|/file/|\?id=)(\w+)""").find(url)?.groupValues?.get(1)
|
||||||
|
val id = app.get("$mainUrl/api/file/share_out_list/?sortField=utime&sortAsc=0&pageNo=1&pageSize=50&shareToken=$token").parsedSafe<Responses>()?.data?.itemId
|
||||||
app.get("$mainUrl/api/file/detail?itemId=$id", referer = url)
|
app.get("$mainUrl/api/file/detail?itemId=$id", referer = url)
|
||||||
.parsedSafe<Responses>()?.data?.itemInfo?.resolutionList?.map { link ->
|
.parsedSafe<Responses>()?.data?.itemInfo?.resolutionList?.map { link ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
|
@ -44,6 +45,7 @@ open class Linkbox : ExtractorApi() {
|
||||||
|
|
||||||
data class Data(
|
data class Data(
|
||||||
@JsonProperty("itemInfo") val itemInfo: ItemInfo? = null,
|
@JsonProperty("itemInfo") val itemInfo: ItemInfo? = null,
|
||||||
|
@JsonProperty("itemId") val itemId: String? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Responses(
|
data class Responses(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue