Skip to content

Instantly share code, notes, and snippets.

View Iamscalla's full-sized avatar

Iamscalla

  • EveryWhere
View GitHub Profile
@Iamscalla
Iamscalla / Console Capture
Created August 31, 2017 04:23 — forked from taitems/Console Capture
Prevent console.log()s from causing JS errors
if (!window.console) {
window.console = {};
window.console.log = function() {
return false;
};
}
@Iamscalla
Iamscalla / plate-snitch.js
Created August 31, 2017 04:22 — forked from taitems/plate-snitch.js
(Extract) Check the status of a vehicle registration and scrape results.
// Open form and submit enquire for `rego`
function getInfo(rego) {
horseman
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0')
.open(url)
.type('#registration-number-ctrl input[type=text]', rego)
.click('.btn-holder input')
.waitForSelector('.ctrl-holder.ctrl-readonly')
.html()
.then(function(body) {