Skip to content

Commit

Permalink
Filter data more precisely
Browse files Browse the repository at this point in the history
  • Loading branch information
dnhn committed Apr 14, 2020
1 parent 9a3bf62 commit f580b8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const FAH = `${HOST}:7396`;
app.use(proxy(FAH, {
userResDecorator: (_, proxyData, userReq) => {
if (userReq.path === '/api/updates' && proxyData) {
console.log(JSON.parse(proxyData.toString('utf-8'))[0]);
const data = JSON.parse(proxyData.toString('utf-8'))[0];
if (data[0] === '/api/slots') console.log(data[1][0]);
}
return new Promise(resolve => resolve(proxyData));
}
Expand Down
6 changes: 3 additions & 3 deletions browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ const driver = new webdriver.Builder()
driver.get('http://127.0.0.1:4444');
driver.manage().window().minimize();

setInterval(() => {
driver.findElement(webdriver.By.id('slots')).click();
}, 120000);
const keepAlive = driver.findElement(webdriver.By.id('slots'));

setInterval(() => keepAlive.click(), 120000);

0 comments on commit f580b8f

Please sign in to comment.