You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the error seems to occur in the jqueryify function... the first line to get context fails... im not really sure how any of this works but it dies on
Script.runInContext(jquery, ctx, filename);
then the document object is null and it tries to call trigger() which doesnt exist
this is the error:
document.trigger(
^
TypeError: Object [ null ] has no method 'trigger'
at /home/ccole/node/spyder/node_modules/spider/main.js:60:16
at Spider._handler (/home/ccole/node/spyder/node_modules/spider/main.js:189:5)
at [object Object].callback (/home/ccole/node/spyder/node_modules/spider/main.js:164:12)
at [object Object]. (/home/ccole/node/spyder/node_modules/request/main.js:273:21)
at [object Object].emit (events.js:64:17)
at IncomingMessage. (/home/ccole/node/spyder/node_modules/request/main.js:261:54)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.onend (http.js:1265:12)
at Socket._onReadable (net.js:659:26)
at IOWatcher.onReadable as callback
The text was updated successfully, but these errors were encountered:
after making some modifications to spiders main.js to try and use the jsdom's jquerify i get
/home/ccole/node/spyder/rank-apis/google/spider/jsdom/lib/jsdom.js:162
window.document.body.appendChild(jQueryTag);
^
TypeError: Cannot call method 'appendChild' of null
at Object.jQueryify (/home/ccole/node/spyder/rank-apis/google/spider/jsdom/lib/jsdom.js:162:24)
at /home/ccole/node/spyder/rank-apis/google/spider/main.js:50:14
at Spider._handler (/home/ccole/node/spyder/rank-apis/google/spider/main.js:206:14)
that led me to find that the window and document objects look ok but there is no document.body not sure why...
heres the code im using to test...
var spider = require('spider');
var s = spider();
s.log('debug');
s.route('www.google.com', '/search*', function (window, $) {
console.log($(window.document.body).text());
});
s.get('http://www.google.com/search?q=carter');
the error seems to occur in the jqueryify function... the first line to get context fails... im not really sure how any of this works but it dies on
Script.runInContext(jquery, ctx, filename);
then the document object is null and it tries to call trigger() which doesnt exist
this is the error:
document.trigger(
^
TypeError: Object [ null ] has no method 'trigger'
at /home/ccole/node/spyder/node_modules/spider/main.js:60:16
at Spider._handler (/home/ccole/node/spyder/node_modules/spider/main.js:189:5)
at [object Object].callback (/home/ccole/node/spyder/node_modules/spider/main.js:164:12)
at [object Object]. (/home/ccole/node/spyder/node_modules/request/main.js:273:21)
at [object Object].emit (events.js:64:17)
at IncomingMessage. (/home/ccole/node/spyder/node_modules/request/main.js:261:54)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.onend (http.js:1265:12)
at Socket._onReadable (net.js:659:26)
at IOWatcher.onReadable as callback
The text was updated successfully, but these errors were encountered: