From 3fffa7be6c1b0ee2440f32f79d6e4796f46e354f Mon Sep 17 00:00:00 2001 From: I Luk Kim Date: Tue, 11 Apr 2023 01:12:35 +0900 Subject: [PATCH] mod --- bingauto2.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bingauto2.js b/bingauto2.js index d99205e..1af249e 100755 --- a/bingauto2.js +++ b/bingauto2.js @@ -155,8 +155,13 @@ module.exports = class BingAuto2 { } await sleep(5); - let point = await this.getText(this.mainPage, 'div.info-columns mee-rewards-counter-animation span'); - console.log('> Current point :', point); + try { + let point = await this.getText(this.mainPage, 'div.info-columns mee-rewards-counter-animation span'); + console.log('> Current point :', point); + } catch (e) { + console.log('Failed to get point'); + return 0; + } return parseInt(point.replace(',', '')); }