File tree Expand file tree Collapse file tree
webmagic-scripts/src/main/java/us/codecraft/webmagic/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import org .apache .commons .io .IOUtils ;
44import org .jruby .RubyHash ;
55import org .python .core .PyDictionary ;
6- import sun .org .mozilla .javascript .internal .NativeObject ;
76import us .codecraft .webmagic .Page ;
87import us .codecraft .webmagic .Site ;
98import us .codecraft .webmagic .processor .PageProcessor ;
@@ -58,13 +57,13 @@ public void process(Page page) {
5857 switch (language ) {
5958 case JavaScript :
6059 engine .eval (defines + "\n " + script , context );
61- NativeObject o = (NativeObject ) engine .get ("result" );
62- if (o != null ) {
63- for (Object o1 : o .getIds ()) {
64- String key = String .valueOf (o1 );
65- page .getResultItems ().put (key , NativeObject .getProperty (o , key ));
66- }
67- }
60+ // NativeObject o = (NativeObject) engine.get("result");
61+ // if (o != null) {
62+ // for (Object o1 : o.getIds()) {
63+ // String key = String.valueOf(o1);
64+ // page.getResultItems().put(key, NativeObject.getProperty(o, key));
65+ // }
66+ // }
6867 break ;
6968 case JRuby :
7069 RubyHash oRuby = (RubyHash ) engine .eval (defines + "\n " + script , context );
You can’t perform that action at this time.
0 commit comments