Skip to content

Instantly share code, notes, and snippets.

@hmpmarketing
Created October 31, 2018 17:37
Show Gist options
  • Save hmpmarketing/a7bbb106529f5ceaaea38e8bdb88b1b3 to your computer and use it in GitHub Desktop.
Save hmpmarketing/a7bbb106529f5ceaaea38e8bdb88b1b3 to your computer and use it in GitHub Desktop.
isAcc = await page.evaluate(async (domain,account_id,time) => {
response = await fetch(`${domain}/api/p/a?account_id=${account_id}&timer=${time}`,{
method: 'GET',
}).then(function(response) {
return response.json();
}).then(function(res) {
if(res.isAcc){
return res.isAcc;
}else{
return res;
}
})
return response
},domain,account_id,time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment