使用方法:
-
-~~ 执行 ~~
</s>npm install fs node-fetch@1.5.2<e> -
-~~ 保存下面内容为 ~~
</s>index.js<e>
const fs = require('fs');
const fetch = require('node-fetch');
let userId = 9904;
try {
userId = require('./config.json');
} catch (error) {}
async function save() {
fs.writeFileSync('./config.json', JSON.stringify(userId), 'utf-8');
}
async function sub(id) {
let req = await fetch(`https://www.nodeloc.com/api/users/${id}`);
if ((await req.json()).data) {
return await sub(id + 1);
}
return id - 1;
}
async function updateUserId() {
userId = await sub(userId);
await save();
}
async function render() {
await updateUserId();
console.clear();
console.log(`UserId: ${userId}`);
}
setInterval(render, 3000);
render();
<e>```</e>
- ~~-~~ 执行 <C>~~`</s>node index.js<e>`</e></C>
- -~~ enjoy~
</LIST>
~~</e>
</r>
0
5

快银 VPN,一键连接全球节点,线路稳定、延迟低。支持 Windows、macOS 等多平台,TUN 全局模式覆盖全部应用流量。无需复杂配置,下载即用。
5 条回复
排序