Extract all profile values that exist for a given customer login on the https://hessenergy.com website

Get Profile Values

On the https://hessenergy.com website, there can be several profile values for a given customer login. These appear in the upper-left hand corner of the page under the Select Profile dropdown.

For some customer logins, there will only be a default profile and no dropdown will appear. In this case the module returns null


npm install -S hess-get-profile-values-for-login


var getProfileValuesForLogin = require('hess-get-profile-values-for-login')
var currentLogin = {
  username: 'fooUsername',
  password: 'barPassword'
getProfileValuesForLogin(currentLogin, function (errreply) {
  if (err) {
    inspect(err, 'error getting profile values for login')
  var values = reply.values
  var jar = reply.jar
  inspect(jar, 'authenticated cookie jar')
  inspect(values, 'profile values')