forked from CatVodTVOfficial/CatVodTVSpider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Proxy.java
32 lines (25 loc) · 925 Bytes
/
Proxy.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.github.catvod.spider;
import android.util.Base64;
import com.github.catvod.crawler.Spider;
import com.github.catvod.live.TxtSubscribe;
import java.util.Map;
public class Proxy extends Spider {
public static Object[] proxy(Map<String, String> params) {
try {
String what = params.get("do");
if (what.equals("nekk")) {
String pic = params.get("pic");
return Nekk.loadPic(pic);
} else if (what.equals("live")) {
String type = params.get("type");
if (type.equals("txt")) {
String ext = params.get("ext");
ext = new String(Base64.decode(ext, Base64.DEFAULT | Base64.URL_SAFE | Base64.NO_WRAP), "UTF-8");
return TxtSubscribe.load(ext);
}
}
} catch (Throwable th) {
}
return null;
}
}