You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
FONGMITV/chaquo/src/main/java/com/fongmi/chaquo/Loader.java

22 lines
491 B

package com.fongmi.chaquo;
import androidx.annotation.Keep;
import com.chaquo.python.PyObject;
import com.chaquo.python.Python;
import com.github.catvod.utils.Path;
public class Loader {
private final PyObject app;
public Loader() {
this.app = Python.getInstance().getModule("app");
}
@Keep
public Spider spider(String api) {
PyObject obj = app.callAttr("spider", Path.py().getAbsolutePath(), api);
return new Spider(app, obj, api);
}
}