View zapier-carsales-email.js
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 webhookUrl = 'PUT YOUR WEBHOOK URL HERE'; | |
var startTag = '<!-- START VEHICLE LISTING -->'; | |
var endTag = '<!-- END VEHICLE LISTING -->'; | |
var urlRegex = new RegExp(/(https?:\/\/[^\s]+)/g); | |
var titleRegex = new RegExp(/\d\d\d\d\s.*/g); | |
var listings = findListing(inputData.emailHtml); | |
var str = findLinks(listings); | |
postToSlack(str); |
View plate-snitch.js
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
openalpr.IdentifyLicense(imagePath, function (error, output) { | |
// handle result | |
}); |
View plate-snitch.js
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
// 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) { |
View Console Capture
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
if (!window.console) { | |
window.console = {}; | |
window.console.log = function() { | |
return false; | |
}; | |
} |