Questions tagged [node-horseman]

node-horseman is a module that allows you to run PhantomJS from Node.

Horseman is built to be placed on top of PhantomJS providing a simpler, chainable api.

Website: http://www.horsemanjs.org/

28 questions
17
votes
1 answer

Why won't a PhantomJS click on this element have the same effect as manually clicking it?

If you visit this site and click on the Attacking tab, the table below updates. I've tried various different ways of making this happen in node-horseman and even PhantomJS, with no luck. Here's a repo with a simple demo of the problem. Any help…
Dominic Tracey
  • 767
  • 6
  • 14
1
vote
0 answers

close the browser tab, opened by opn in node js

I'm using the opn package to open a url in my browser. I need to close that window after some time from the node service. How do I achieve that using opn? I tried with node-horseman. I can't use that more than once, however. If I try, I get an issue…
Prabha
  • 29
  • 7
1
vote
0 answers

Scraping a batch of pages with node horseman: some exceptions aren't catched

I'm using nodejs with horseman to scrape a list of (known to be valid) urls, performing the same scraping operation on all of them in sequence. I try to catch the errors, but sometimes some exception still slips through and hangs the script. I can…
Zander Aze
  • 11
  • 3
1
vote
1 answer

Queue of node-horseman calls

I'm developing a web scraper (in its early stages) and I plan to do x horseman calls. This calls are promise based but I want the calls to be sequentially, when one finishes, the next starts. How can I achieve this behavior?
xmarston
  • 853
  • 3
  • 12
  • 36
1
vote
0 answers

How to visit one by one a set of subpages after login using horsemanjs?

I would like to login to application and then, as authorized user, be able to sequentially open a set of pages and do some actions on each (click and read data). const subpages = ['sub1', 'sub2']; const horseman = new Horseman(); horseman …
ziomyslaw
  • 201
  • 2
  • 12
1
vote
2 answers

Unhandled rejection Error - horseman

Im trying to run the example code from horsemanjs slightly modified: var Horseman = require('node-horseman'); var horseman = new Horseman(); horseman .userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0') …
Chip
  • 11
  • 5
1
vote
1 answer

PhantomJS process is dying if server is not reset after one execution

My project contains few methods that uses node-horseman, but after every server restart, the process will die after I executed something, whatever method it is. For example, I have one method that retrieves a list of Alerts I have in Google…
user4383363
1
vote
0 answers

node-horseman failing with phantomjs-prebuilt

So I have been banging my head against a wall all day trying to figure out what the issue is but have yet to find a solution. I have posted all the npm modules, test code, and output below. When I install "phantomjs@1.9" using npm the test code…
Pat841
  • 2,663
  • 4
  • 17
  • 15
1
vote
0 answers

Node horseman not working on AngularJS select options

I am trying to change AngularJS based select options using horseman. Unfortunately, it is not working out for me. The website is: https://www.cars.com/ I can't seem to change the make, model, price drop downs. horseman .userAgent('Mozilla/5.0…
Himanshu Jain
  • 1,809
  • 1
  • 13
  • 23
1
vote
0 answers

Can´t get second to last li of ul from Instagram Follower with Phantomjs through node-horseman

this is my first quest here. I search for the Problem and haven´t found an answer yet so i hope someone here is able to give me a hint. The Situation is as follows: I use node-horseman 3.1.1 to retrieve my follower from Instagram. My Workflow is…
Frank
  • 11
  • 1
  • 2
0
votes
1 answer

How to Loop Horseman instance while passing a variable in each iteration?

So I am trying to write a script in javascript using horseman.js that will pull all html from each link stored in an array of urls the basic idea is what follows and logs one url's html just fine var Horseman = require('node-horseman'); var result…
Tahum
  • 37
  • 5
0
votes
1 answer

How do I get cURL to bypass this tough bot blocker?

I need to be able to programmatically read or scrape the contents of this URL: https://www.toysrus.com/product?productId=122872496 I've tried setting user-agent, cookies, all sorts. I've also tried the Chrome 'Copy as cURL' command from Developer…
Dave Hilditch
  • 5,299
  • 4
  • 27
  • 35
0
votes
1 answer

Horseman - clicking multiple buttons then grabbing data - How?

I want to parse a web-page which could have any number of buttons. I want to click on all buttons and grab some resulting data from each button-press. I don't have any idea how to do this. My horse-man code, so far: horse .on('resourceError',…
ImTalkingCode
  • 353
  • 1
  • 3
  • 14
0
votes
1 answer

cant run FOR loops inside .evaluate (node-horseman / phantomjs)

Hello Everyone! I am trying to do do a web-crawler with node-horseman, that make easier do work with phantomJS. But I am stuck at one point. Apparently, i can't run for loops inside .evaluate, is it right? The gist with my…
0
votes
0 answers

Horseman js https blank page

var horseman = new Horseman({ timeout: 30000, ignoreSSLErrors: true, sslProtocol: 'tlsv1', phantomOptions: { 'proxy' : "proxy.crawlera.com:8010", 'proxy-auth' : "8888" } }); var…
1
2