add - Upyso888888
This commit is contained in:
@@ -51,7 +51,7 @@ public class JsonBasic {
|
||||
int start = url.indexOf("cat_ext=");
|
||||
int end = url.indexOf("&", start);
|
||||
String ext = url.substring(start + 8, end);
|
||||
ext = getBase64(ext);
|
||||
ext = Base64.decode(ext, Base64.DEFAULT | Base64.URL_SAFE | Base64.NO_WRAP);
|
||||
String newUrl = url.substring(0, start) + url.substring(end + 1);
|
||||
JSONObject jsonObject = new JSONObject(ext);
|
||||
if (jsonObject.has("header")) {
|
||||
@@ -70,11 +70,18 @@ public class JsonBasic {
|
||||
return reqHeaders;
|
||||
}
|
||||
|
||||
public static String getBase64(String json){
|
||||
json = new String(Base64.decode(json, Base64.DEFAULT | Base64.URL_SAFE | Base64.NO_WRAP));
|
||||
return json;
|
||||
public static String getBase64(String decodeStr){
|
||||
if (decodeStr == null) return null;
|
||||
try {
|
||||
byte[] b = Base64.decode(decodeStr,Base64.DEFAULT);
|
||||
return new String(b);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
return decodeStr;
|
||||
}
|
||||
|
||||
|
||||
public static HashMap<String, String> parse(String url) {
|
||||
String json = OkHttpUtil.string(url, Misc.Headers(1));
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ public class Upyunso extends Spider {
|
||||
public String searchContent(String key, boolean z) {
|
||||
try {
|
||||
JSONArray jSONArray = new JSONArray();
|
||||
key = URLEncoder.encode(key);
|
||||
JSONArray arr = Base64Utils.getJSONByUrl("https://api.upyunso.com/search?keyword=" + key);
|
||||
if (arr.length() > 0) {
|
||||
String pic = "http://image.xinjun58.com/image/tv/ups.jpg";
|
||||
|
||||
Reference in New Issue
Block a user