Web Scrapper in CasperJS

Required NPM modules

Required npms:

 

GLOBAL

#apt-get install node

#npm install -g express

#npm install -g express-generator

 

#npm install -g casperjs    -phantomJS is inside /usr/lib/node_modules/casperjs/ so it is not neccesery to install phantomjs separately

 

LOCAL

$mkdir find-ads                      -create dir proksi (the root of the project)

$cd find-ads

$express . -H -c less           - dot= dont create folder

$npm install                        -installs modules upon package.json

 

Additionally we can install var dump:

$npm install dump --save             -module for var dump (--save option save dependency into package.json)

 

 

 

Now package.json file will looks like:

 

{
  "name": "find-ads",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "body-parser": "~1.10.2",
    "cookie-parser": "~1.3.3",
    "debug": "~2.1.1",
    "dump": "^1.0.1",
    "express": "~4.11.1",
    "hjs": "~0.0.6",
    "less-middleware": "1.0.x",
    "morgan": "~1.5.1",
    "serve-favicon": "~2.2.0"
  }
}