spookyjs

Node.js SpookyJS: error executing hello.js

谁说胖子不能爱 提交于 2020-02-05 05:11:05
问题 I have installed SpookyJS to execute CasperJs commands in Node.js. I Installed it with this command: npm install spooky , I´m using a Centos machine. the error: $ node node_modules/spooky/examples/hello.js events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:980:11) at Process.ChildProcess._handle.onexit (child_process.js:771:34) Thanks in advance 来源: https://stackoverflow.com/questions/21379677/node-js-spookyjs-error-executing-hello-js

How to emulate mouseover or run JS function on page with PhantomJS in NodeJS

主宰稳场 提交于 2019-12-08 11:52:16
问题 NodeJS, PhantomJS, content parsing with Cheerio Need to parse webpage, that contains dynamically loaded div(hint). The event can be on many table td's, here is an example When I 'mouseover' on specific td I see this orange block with data, it's dynamically loaded with function, like this onmouseover="page.hist(this,'P-0.00-0-0','355svxv498x0x0',417,event,0,1)" I can view this info only after the page is loaded. Need to a specific row, only Marathonbet. When the function runs, the text is

communication between Node/Express and Spooky/Casper js

孤人 提交于 2019-12-06 15:59:21
问题 I tried to incorporate node/express with spooky js. However, I wasn't able to send back the elements I retrieved using spookyjs. Below is my code. With my code, I only got foo printed out although I intended to get all the DOM elements data with spooky. I was wondering if anyone has the experience how this can be done? Thanks in advance! server.js var express = require("express"); var site = express.createServer(); var fill = require('./spooky_fill.js'); site.use(express.static(__dirname + '/

How to perfectly isolate and clear environments between each test?

核能气质少年 提交于 2019-12-06 02:29:57
问题 I'm trying to connect to SoundCloud using CasperJS. What is interesting is once you signed in and rerun the login feature later, the previous login is still active. Before going any further, here is the code: casper.thenOpen('https://soundcloud.com/', function() { casper.click('.header__login'); popup = /soundcloud\.com\/connect/; casper.waitForPopup(popup, function() { casper.withPopup(popup, function() { selectors = { '#username': username, '#password': password }; casper.fillSelectors(

communication between Node/Express and Spooky/Casper js

◇◆丶佛笑我妖孽 提交于 2019-12-04 22:23:18
I tried to incorporate node/express with spooky js. However, I wasn't able to send back the elements I retrieved using spookyjs. Below is my code. With my code, I only got foo printed out although I intended to get all the DOM elements data with spooky. I was wondering if anyone has the experience how this can be done? Thanks in advance! server.js var express = require("express"); var site = express.createServer(); var fill = require('./spooky_fill.js'); site.use(express.static(__dirname + '/..')); site.get("/", function(req, res) { fs.createReadStream("./index.html").pipe(res); }); site.get('

How to perfectly isolate and clear environments between each test?

久未见 提交于 2019-12-04 08:18:54
I'm trying to connect to SoundCloud using CasperJS. What is interesting is once you signed in and rerun the login feature later, the previous login is still active. Before going any further, here is the code: casper.thenOpen('https://soundcloud.com/', function() { casper.click('.header__login'); popup = /soundcloud\.com\/connect/; casper.waitForPopup(popup, function() { casper.withPopup(popup, function() { selectors = { '#username': username, '#password': password }; casper.fillSelectors('form.log-in', selectors, false); casper.click('#authorize'); }); }); }); If you run this code at least