CallMeJess / Yellow-Pages-Canada-Phone-Number-Scraper

Scrape Yellow Pages Canada for phone numbers in specified locations by keywords and output them to a CSV.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yellow Pages Canada Phone Number Scraper

About

Scrape Yellow Pages Canada for phone numbers, output the list to CSV file - Script removes duplicate phone numbers. Screen shot

CasperJS

First use npm to install casperjs -

$ npm install casperjs
OR
$ npm install -g casperjs

Customize

Update the host{} in scraper.js -

var host = {
    // main connect
    url: 'http://yellowpages.ca',
    // areas to search
    area: [
        'calgary',
        'toronto',
        'montreal'
    ],
    // business keyword
    keyword: 'plumbing',
    // creates complete link
    search: function (pageNumber) {
        return host.url + "/search/si/" + pageNumber + '/' + host.keyword + '/' + host.area;
    }
};

Running

Redirect your terminal to the scraper directory then -

$ casperjs scraper.js

About

Scrape Yellow Pages Canada for phone numbers in specified locations by keywords and output them to a CSV.


Languages

Language:JavaScript 100.0%