FENGMI蜂蜜影视 原始JAR及配置
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.
 
 

25 lines
639 B

package com.github.catvod.spider;
import android.content.Context;
import com.github.catvod.crawler.Spider;
import com.github.catvod.crawler.SpiderDebug;
import com.whl.quickjs.wrapper.QuickJSContext;
public class JSDemo extends Spider {
private QuickJSContext jsContext;
@Override
public void init(Context context, String extend) {
jsContext = QuickJSContext.create();
jsContext.evaluate("var text = 'Hello QuickJS';");
String text = jsContext.getGlobalObject().getString("text");
SpiderDebug.log(text);
}
@Override
public void destroy() {
jsContext.destroy();
}
}