多线程测试
This commit is contained in:
parent
68c4b89344
commit
ff2ecbeefc
|
|
@ -79,6 +79,7 @@ public class ProxyVideo {
|
||||||
|
|
||||||
|
|
||||||
public static Object[] proxyMultiThread(String url, Map<String, String> headers) throws Exception {
|
public static Object[] proxyMultiThread(String url, Map<String, String> headers) throws Exception {
|
||||||
|
SpiderDebug.log("--proxyMultiThread: start ");
|
||||||
Map<String, String> newHeaders = new HashMap<>(headers);
|
Map<String, String> newHeaders = new HashMap<>(headers);
|
||||||
newHeaders.put("range", "bytes=0-0");
|
newHeaders.put("range", "bytes=0-0");
|
||||||
Object[] info = proxy(url, newHeaders);
|
Object[] info = proxy(url, newHeaders);
|
||||||
|
|
@ -87,8 +88,10 @@ public class ProxyVideo {
|
||||||
return proxy(url, headers);
|
return proxy(url, headers);
|
||||||
}
|
}
|
||||||
String contentRange = ((Map<String, String>) info[3]).get("Content-Range");
|
String contentRange = ((Map<String, String>) info[3]).get("Content-Range");
|
||||||
|
SpiderDebug.log("--contentRange:" + contentRange);
|
||||||
//文件总大小
|
//文件总大小
|
||||||
String total = StringUtils.split(contentRange, "/")[1];
|
String total = StringUtils.split(contentRange, "/")[1];
|
||||||
|
SpiderDebug.log("--文件总大小:" + total);
|
||||||
|
|
||||||
|
|
||||||
String range = headers.get("range");
|
String range = headers.get("range");
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
5977963210de316129a4b64a7261d469
|
0c62b039f16a98ecdb8b6e8ace67d52a
|
||||||
|
|
|
||||||
|
|
@ -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": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "电视直播",
|
"name": "电视直播",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue