|
|
|
@ -144,7 +144,7 @@ public class Spider extends com.github.catvod.crawler.Spider { |
|
|
|
private void createCtx() { |
|
|
|
private void createCtx() { |
|
|
|
ctx = QuickJSContext.create(); |
|
|
|
ctx = QuickJSContext.create(); |
|
|
|
QuickJSLoader.initConsoleLog(ctx); |
|
|
|
QuickJSLoader.initConsoleLog(ctx); |
|
|
|
Global.create(ctx, executor).setProperty(); |
|
|
|
Global.create(ctx, executor, proxy()).setProperty(); |
|
|
|
ctx.getGlobalObject().setProperty("local", Local.class); |
|
|
|
ctx.getGlobalObject().setProperty("local", Local.class); |
|
|
|
ctx.getGlobalObject().getContext().evaluate(Path.asset("js/lib/http.js")); |
|
|
|
ctx.getGlobalObject().getContext().evaluate(Path.asset("js/lib/http.js")); |
|
|
|
ctx.setModuleLoader(new QuickJSContext.DefaultModuleLoader() { |
|
|
|
ctx.setModuleLoader(new QuickJSContext.DefaultModuleLoader() { |
|
|
|
|