This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird'); | |
var MongoDB = Promise.promisifyAll(require("mongodb")); | |
var MongoClient = Promise.promisifyAll(MongoDB.MongoClient); | |
var cheerio = require('cheerio'); | |
var http = require('http'); | |
var urls = [ | |
'http://www.magentocommerce.com/certification/directory/index/?q=&country_id=AU®ion_id=®ion=vic&certificate_type=', | |
'http://www.magentocommerce.com/certification/directory/index/?q=&country_id=AU®ion_id=®ion=victoria&certificate_type=' | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |