Skip to content

Commit 31ca6df

Browse files
authored
Merge branch 'main' into dev
2 parents efae34d + caee921 commit 31ca6df

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1l1fAyDzNSSCVOF_JBpXRp2b3SHuI5bz6?usp=sharing) Accuracy 100% CAPTCHA weight: xserver_captcha.keras
1+
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1l1fAyDzNSSCVOF_JBpXRp2b3SHuI5bz6?usp=sharing) Accuracy 100% CAPTCHA weight: xserver_captcha.keras [repo](https://github.com/GitHub30/captcha-cloudrun)
22

33
[![](https://github.com/user-attachments/assets/f3db034f-1b1b-4983-9f9a-06a3aeb1b64e)](https://colab.research.google.com/drive/1l1fAyDzNSSCVOF_JBpXRp2b3SHuI5bz6?usp=sharing)
44

reminder.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ try {
3131
await page.locator('#user_password').fill(process.env.PASSWORD)
3232
await page.locator('text=ログインする').click()
3333
await page.waitForNavigation({ waitUntil: 'networkidle2' })
34-
// TODO: Alert Upcoming Expiration Notice with Email, Slack, Discord
34+
const expireDate = await page.$eval('tr:has(.freeServerIco) .contract__term', p => p.textContent)
35+
const tomorrow = new Date(Date.now() + 86400000).toLocaleDateString('sv', { timeZone: 'Asia/Tokyo' })
36+
console.log('expireDate', expireDate, 'tomorrow', tomorrow, expireDate === tomorrow)
37+
// 如果到期日是明天,则准备续期
38+
if (expireDate === tomorrow) {
39+
// TODO: 通过电子邮件、Slack 和 Discord 提醒即将到期的通知
40+
fetch('https://script.google.com/macros/s/AKfycbzbAcpAe_LGZsXpxjRl9aOV60q-XmuNC_bj62B5G45vR3vB13THNpoqiZr08AjMn_53Ug/exec?recipient=' + process.env.EMAIL)
41+
}
3542
} catch (e) {
3643
console.error(e)
3744
} finally {

renew.user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,4 +431,4 @@
431431
// 入口调用
432432
main();
433433

434-
})();
434+
})();

0 commit comments

Comments
 (0)