Skip to content

Instantly share code, notes, and snippets.

@RubyRonin
Created October 12, 2015 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RubyRonin/a203c05df621beed603b to your computer and use it in GitHub Desktop.
Save RubyRonin/a203c05df621beed603b to your computer and use it in GitHub Desktop.
var request = require('bluebird'),
bhttp = require('bhttp'),
cheerio = require('cheerio'),
fs = require('fs'),
formData = [];
bhttp.get("http://services.phila.gov/", {}, function(err, response) {
if (err) {
return console.error('ERROR! This is what went wrong:', err);
}
var body = response.body;
var $ = cheerio.load(body);
$('input[type="text"]').val('test').html().each(function(){
var formData = this;
});
});
console.log(formData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment