kt携程版本
This commit is contained in:
parent
bcaa6f18bd
commit
1bf138ada9
|
|
@ -43,6 +43,7 @@ object DownloadMT {
|
|||
}
|
||||
|
||||
val code = info?.get(0) as Int
|
||||
SpiderDebug.log("-----------code:" + code)
|
||||
if (code != 206) {
|
||||
return proxy(url, headers)
|
||||
}
|
||||
|
|
@ -114,12 +115,8 @@ object DownloadMT {
|
|||
launch {
|
||||
for (bytes in channels[index]) {
|
||||
// 处理读取的数据
|
||||
|
||||
outputStream.write(bytes);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
// 等待所有下载完成
|
||||
|
|
@ -151,6 +148,7 @@ object DownloadMT {
|
|||
// SpiderDebug.log("++proxy res body:" + response.body());
|
||||
SpiderDebug.log("----proxy res respHeaders:" + Json.toJson(resHeader))
|
||||
val pipedInputStream = ByteArrayInputStream(outputStream.toByteArray());
|
||||
outputStream.close()
|
||||
return arrayOf(206, contentType, pipedInputStream, resHeader)
|
||||
|
||||
} catch (e: Exception) {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
59ca6e1cbed916f663fb3d0db2114517
|
||||
3ae6f55c9957262dfad22101c095d543
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadkt/jar/custom_spider.jar;md5;59ca6e1cbed916f663fb3d0db2114517",
|
||||
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThreadkt/jar/custom_spider.jar;md5;3ae6f55c9957262dfad22101c095d543",
|
||||
"lives": [
|
||||
{
|
||||
"name": "电视直播",
|
||||
|
|
|
|||
Loading…
Reference in New Issue