refactor: 重构获取anonymous token以及xeapikey的获取

This commit is contained in:
Takanashi Hoshino
2026-09-13 11:13:56 +08:00
parent a8c781fd64
commit c478367c6c
11 changed files with 656 additions and 78 deletions
-6
View File
@@ -1,13 +1,7 @@
const fs = require('fs')
const path = require('path')
const tmpPath = require('os').tmpdir()
const { cookieToJson } = require('./util')
const anonymousTokenPath = path.resolve(tmpPath, 'anonymous_token')
if (!fs.existsSync(anonymousTokenPath)) {
fs.writeFileSync(anonymousTokenPath, '', 'utf-8')
}
/** @type {Record<string, any>} */
let obj = {}