多线程测试

This commit is contained in:
lushunming 2025-06-18 15:22:38 +08:00
parent 68c4b89344
commit ff2ecbeefc
4 changed files with 5 additions and 2 deletions

View File

@ -79,6 +79,7 @@ public class ProxyVideo {
public static Object[] proxyMultiThread(String url, Map<String, String> headers) throws Exception {
SpiderDebug.log("--proxyMultiThread: start ");
Map<String, String> newHeaders = new HashMap<>(headers);
newHeaders.put("range", "bytes=0-0");
Object[] info = proxy(url, newHeaders);
@ -87,8 +88,10 @@ public class ProxyVideo {
return proxy(url, headers);
}
String contentRange = ((Map<String, String>) info[3]).get("Content-Range");
SpiderDebug.log("--contentRange:" + contentRange);
//文件总大小
String total = StringUtils.split(contentRange, "/")[1];
SpiderDebug.log("--文件总大小:" + total);
String range = headers.get("range");

Binary file not shown.

View File

@ -1 +1 @@
5977963210de316129a4b64a7261d469
0c62b039f16a98ecdb8b6e8ace67d52a

View File

@ -1,5 +1,5 @@
{
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThread/jar/custom_spider.jar;md5;5977963210de316129a4b64a7261d469",
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThread/jar/custom_spider.jar;md5;0c62b039f16a98ecdb8b6e8ace67d52a",
"lives": [
{
"name": "电视直播",