Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between node.js , casper.js and phantom.js? [closed]

I have read these three are used for web scraping . But whats the difference ? in what kind of environment is one better than the other ?

like image 881
user1790836 Avatar asked Feb 23 '14 08:02

user1790836


People also ask

What is Phantom JS used for?

Headless Testing - PhantomJS is a popular tool for running unit tests. It can simulate user behaviour like resource request and resource receipt without using the UI. It executes automated tests and displays results in the command line. Page Automation - PhantomJS can load and manipulate web pages.

Is there a difference between node and node JS?

nodejs is a modern javascript-oriented server framework typically used to provide various services and realtime applications, while node is an older framework for transmitting data packets over amateur radio.

Which is better js or node JS?

JavaScript is a simple programming language that runs in any browser JavaScript Engine. Whereas Node JS is an interpreter or running environment for a JavaScript programming language that holds many excesses, it requires libraries that can easily be accessed from JavaScript programming for better use.


1 Answers

Nodejs is a scripting engine based on Chrome's V8 engine. Nodejs is commonly used as a web server but it is really is a script engine that can run any types of script you like. Node can be used for web scraping by making requests to other servers and then analysing the output.

Phantomjs is a headless webkit browser, which means that it acts just like a browser but doesn't have a UI. Used on its own, it forms a part of a web testing framework but is much better used with...

Casperjs is a utility built on top of Phantomjs that helps you build automated tests.

An automated test can be seen as a web scraper but that's not really what it's for. Web tests are usually sensitive to changes on the page that's being scraped and do not have to be fast at DOM manipulation (because you tend to do one page at a time).

I think nodejs is probably best for what you want.

like image 117
Dr Rob Lang Avatar answered Oct 11 '22 21:10

Dr Rob Lang