-
JUEJIN自动签到及其使用步骤
-
打开签到页面找到签到按钮(先别点签到);
-
清空network;
-
点击签到按钮,在network查看该接口:api.juejin.cn/growth\_api…
-
复制该接口URL(脚本中需要该地址);
-
打开控制台找个位置执行下面代码;
-
不要关该签到页面就会自动在自定义的时间点每天自动签到;
-
需求有什么改进,评论区留言分分钟钟搞定
-
点赞鼓励
-
扫码支付鼓励
var timeoutFunc = function(config, func) {
config.runNow && func()
let nowTime = new Date().getTime()
let timePoints = config.time.split(':').map(i => parseInt(i))
let recent = new Date().setHours(...timePoints)
recent >= nowTime || (recent += 24 * 3600000 )
setTimeout(() => {
func()
setInterval(func, config.interval * 3600000 )
}, recent - nowTime)
}
//签到接口URL, 记得替换成自己的接口URL
var myurl = "https://api.juejin.cn/growth_api/v1/check_in?_signature=_02B4Z6wo009019pPdxQAAIDAar6b3Y.O2lPaS3OAAJZthbDNPldTWgF6vady2s89QeBJGcpKfHFeaCCjZ.Ee6ZIOhKiVpPFcgscFu2Sj1MizuHW77BChdVKmaZRsYjLmhS.z0U2kNygtYB1md2"
var fn = function() {
var xml = new XMLHttpRequest();
xml.open("POST", myurl);
xml.withCredentials = true;
xml.send();
xml.onload = e => {
console.log(e.currentTarget.response);
}
}
timeoutFunc({
interval: 1, //间隔天数,间隔为整数
runNow: true, //是否立即运行
time: "00:01:00" //执行的时间点 时在0~23之间
},
fn
)
- 二维码