casper-base | Utils for scraping the web with CasperJs
A personal, simple module of CasperJs for scraping the web!
Turned out that there are some configurations (and some utils) that I always needed (re)writing a scraper in CasperJs. So I'm trying to wrap every simple and almost full configurable piece of code to start new projects from here and not totally from scratch or with copy-paste.
You can simply install via NPM, but the
require will be a little bigger cause you will run it with CasperJs and not with NodeJs.
npm install casper-base
Or clone the repo if you want start from here:
git clone https://github.com/LasaleFamine/casper-base.git
Or simply download the main files:
/custom-utils (entire folder)
And put them in the root directory of your project.
Right now you can change directly the
config.json file of the NPM module to change the configuration of your
You can also clone this repo and change the configurations as you want.
For more information about CasperJs configuration: Casper Options
require for your casper instance the
If was installed via NPM:
var casper =
Or if the file is in your root directory:
var casper =
Don't forget to leave the
custom-utils folder within the main
casper_base with the current hierachy.
phantomjs if you did't yet:
npm install --save casperjs phantomjs
Write your first scrapy!
var casper =// Simulate error 404casperstart''casper
Forks are always appreciate! ✈️