|
|
|
|
@ -57,9 +57,9 @@ public class BaseLoader { |
|
|
|
|
else return new SpiderNull(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Spider getSpider(Map<String, String> params) { |
|
|
|
|
Live live = LiveConfig.get().getLive(params.get("siteKey")); |
|
|
|
|
Site site = VodConfig.get().getSite(params.get("siteKey")); |
|
|
|
|
public Spider getSpider(String key) { |
|
|
|
|
Site site = VodConfig.get().getSite(key); |
|
|
|
|
Live live = LiveConfig.get().getLive(key); |
|
|
|
|
if (!site.isEmpty()) return site.spider(); |
|
|
|
|
if (!live.isEmpty()) return live.spider(); |
|
|
|
|
return new SpiderNull(); |
|
|
|
|
@ -75,7 +75,7 @@ public class BaseLoader { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Object[] proxyLocal(Map<String, String> params) throws Exception { |
|
|
|
|
if (params.containsKey("siteKey")) return BaseLoader.get().getSpider(params).proxyLocal(params); |
|
|
|
|
if (params.containsKey("siteKey")) return getSpider(params.get("siteKey")).proxyLocal(params); |
|
|
|
|
if ("js".equals(params.get("do"))) return jsLoader.proxyInvoke(params); |
|
|
|
|
if ("py".equals(params.get("do"))) return pyLoader.proxyInvoke(params); |
|
|
|
|
return jarLoader.proxyInvoke(params); |
|
|
|
|
|