Add Dovx
This commit is contained in:
parent
ca8f7ef682
commit
0edcb9d308
|
|
@ -43,6 +43,10 @@ public class Result {
|
||||||
@SerializedName("total")
|
@SerializedName("total")
|
||||||
private int total;
|
private int total;
|
||||||
|
|
||||||
|
public static Result objectFrom(String str) {
|
||||||
|
return new Gson().fromJson(str, Result.class);
|
||||||
|
}
|
||||||
|
|
||||||
public static String string(List<Class> classes, List<Vod> list, LinkedHashMap<String, List<Filter>> filters) {
|
public static String string(List<Class> classes, List<Vod> list, LinkedHashMap<String, List<Filter>> filters) {
|
||||||
return Result.get().classes(classes).vod(list).filters(filters).string();
|
return Result.get().classes(classes).vod(list).filters(filters).string();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,10 @@ public class Vod {
|
||||||
this.vodContent = Trans.get(vodContent);
|
this.vodContent = Trans.get(vodContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getVodContent() {
|
||||||
|
return vodContent;
|
||||||
|
}
|
||||||
|
|
||||||
public void setVodPlayFrom(String vodPlayFrom) {
|
public void setVodPlayFrom(String vodPlayFrom) {
|
||||||
this.vodPlayFrom = Trans.get(vodPlayFrom);
|
this.vodPlayFrom = Trans.get(vodPlayFrom);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.github.catvod.spider;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.github.catvod.bean.Result;
|
||||||
|
import com.github.catvod.bean.Vod;
|
||||||
|
import com.github.catvod.net.OkHttp;
|
||||||
|
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
|
||||||
|
public class Dovx extends Ali {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(Context context, String extend) {
|
||||||
|
super.init(context, extend);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String searchContent(String key, boolean quick) {
|
||||||
|
Result result = Result.objectFrom(OkHttp.string("https://api.dovx.tk/ali/search?wd=" + URLEncoder.encode(key)));
|
||||||
|
for (Vod vod : result.getList()) vod.setVodId(vod.getVodContent());
|
||||||
|
return result.string();
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
130be941d3dc5eace206287935bd5ccd
|
f2064f61914f9fe0258820ab04b5abce
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue