Created
March 31, 2017 18:00
-
-
Save aaroneiche/84d8a77cac8531d1c4f426bd5a6fef5e to your computer and use it in GitHub Desktop.
A simple node script for parsing a Police Dispatch webpage.
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
'use strict' | |
var $ = require('cheerio') | |
var request = require('request') | |
function gotHTML(err, resp, html) { | |
if (err) return console.error(err) | |
var parsedHTML = $.load(html) | |
parsedHTML("tr td").map(function(i,td){ | |
console.log($(td).text()); | |
}); | |
} | |
var domain = 'http://coeapps.eugene-or.gov/SPDDispatchLog/' | |
request(domain, gotHTML) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment