5 ms·
Serverless PhantomJS with IronWorker
- malandrew 14y agoWhat about a CasperJs version as well?
- heretohelp 14y agocasperjs is pretty unreliable, I wouldn't bother. Even for relatively trivial frontend testing we were using it for, it would crash ~50% of the time on Linux and Mac.
- zhodge 14y agoReally? I actually found it to be quite stable for a scrape project I had; it was rather trivial too though. My only gripe is with the cryptic error messages I was receiving when executing JavaScript in a casper browser. But that could have just been my ignorance and unfamiliarity.
- jonpaul 14y agoThat's not CasperJS that's unreliable. That's PhantomJS crashing. Which version of PhantomJS where you using?
- baudehlo 14y agoPhantomJS 1.6 is massively unstable. Downgrade to 1.5. I'm really surprised this hasn't been fixed yet - there are bugs in their tracker related to it.
- heretohelp 14y agoThat appears to have fixed it.
- 0k1n 14y agoI'm happy to learn that (casperjs author here)
- carimura 14y agoHaven't worked with Casper yet but I'd be happy to build a similar example in our examples repo using Casper. Additionally you could install it using the build() command in the .worker file very similar to the way PhantomJS is installed.
- jonpaul 14y agoSince CasperJS is just a set of JavaScript files that run on PhantomJS, you shouldn't have any problems running it.
- carimura 14y agoHere ya go: https://github.com/iron-io/iron_worker_examples/tree/master/binary/casperjs https://github.com/iron-io/iron_worker_examples/tree/master/... I just included the whole CasperJS library with the worker package and followed the getting started example from the Casper site.
- dentldir 14y agoOn the iron_worker upload crawler step: ERROR -- IronWorkerNG: Can't find src with path='node_modules'
- enlighten_user 14y agoDid you copy node_modules directory from repo?
- carimura 14y agoHey Dentldir, make sure you get everything from that phantom-nodejs folder.... Try a git clone https://github.com/iron-io/iron_worker_examples https://github.com/iron-io/iron_worker_examples and then follow the directions from /binary/phantom-nodejs
- dentldir 14y agoMuch better. I manually downloaded the files the first time and missed the directory. Thanks.
- LogicX 14y agoI'll echo another - how about wkhtmltopdf ?
- carimura 14y agoHey LogicX, https://github.com/iron-io/iron_worker_examples/tree/master/binary/wkhtmltopdf https://github.com/iron-io/iron_worker_examples/tree/master/... then follow the blog post. Let me know if you have any questions or issues. I'll try and do something more exciting later like grab 100 sites, create pdfs, and store them in S3 all in parallel.