|
|
|
|
@ -18,6 +18,7 @@ import com.github.catvod.utils.Utils; |
|
|
|
|
|
|
|
|
|
import org.json.JSONObject; |
|
|
|
|
|
|
|
|
|
import java.io.ByteArrayInputStream; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Collections; |
|
|
|
|
@ -25,8 +26,11 @@ import java.util.HashMap; |
|
|
|
|
import java.util.Iterator; |
|
|
|
|
import java.util.LinkedHashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.concurrent.CountDownLatch; |
|
|
|
|
|
|
|
|
|
import okhttp3.Response; |
|
|
|
|
|
|
|
|
|
public class AList extends Spider { |
|
|
|
|
|
|
|
|
|
private List<Drive> drives; |
|
|
|
|
@ -256,9 +260,20 @@ public class AList extends Spider { |
|
|
|
|
String[] split = text.split("@@@"); |
|
|
|
|
String name = split[0]; |
|
|
|
|
String ext = split[1]; |
|
|
|
|
String url = getDetail(split[2]).getUrl(); |
|
|
|
|
String url = Proxy.getUrl() + "?do=alist&url=" + getDetail(split[2]).getUrl(); |
|
|
|
|
sub.add(Sub.create().name(name).ext(ext).url(url)); |
|
|
|
|
} |
|
|
|
|
return sub; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Object[] proxy(Map<String, String> params) throws Exception { |
|
|
|
|
String url = params.get("url"); |
|
|
|
|
Response res = OkHttp.newCall(url); |
|
|
|
|
byte[] body = Utils.toUtf8(res.body().bytes()); |
|
|
|
|
Object[] result = new Object[3]; |
|
|
|
|
result[0] = 200; |
|
|
|
|
result[1] = "application/octet-stream"; |
|
|
|
|
result[2] = new ByteArrayInputStream(body); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
} |