Skip to content

Commit

Permalink
Session HotFix
Browse files Browse the repository at this point in the history
  • Loading branch information
INSANITY\Inrix authored and INSANITY\Inrix committed Dec 13, 2017
1 parent 3905ab4 commit 4b86ecb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scrape.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,15 @@ function parseKey() {
}
}, function (err, resp, body) {
settings.key = body.replace(/.*wmsAuthSign=*/, '') // Strip everything except for the key from the generated url
if (settings.key.length !== 144) {
console.log('Invalid Key! Attempting to re-authenticate...');
settings.cookies.ips4_IPSSessionFront = ''
checkAuth().then(constructCookie).then(parseKey).then(resolve)
} else {
//if (settings.key.length !== 144) {
// console.log(settings.key)
// console.log('Invalid Key! Attempting to re-authenticate...');
// settings.cookies.ips4_IPSSessionFront = ''
// checkAuth().then(constructCookie).then(parseKey).then(resolve)
//} else {
console.log('Fetched!\n');
resolve()
}
//}
});
})
}
Expand Down

0 comments on commit 4b86ecb

Please sign in to comment.