惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
N
Netflix TechBlog - Medium
腾讯CDC
C
Check Point Blog
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
S
SegmentFault 最新的问题
F
Fortinet All Blogs
美团技术团队
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 司徒正美
F
Full Disclosure
Recorded Future
Recorded Future
D
DataBreaches.Net
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
J
Java Code Geeks
I
InfoQ
Y
Y Combinator Blog
A
About on SuperTechFans
AI
AI
爱范儿
爱范儿
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
W
WeLiveSecurity
M
MIT News - Artificial intelligence
雷峰网
雷峰网
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
Schneier on Security
Schneier on Security
The GitHub Blog
The GitHub Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Docker
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
V2EX - 技术
V2EX - 技术
Project Zero
Project Zero

WishMeLz - 猎奇

Namecrane/CraneMail 优化访问速度之 - Nginx stream 做 TCP 邮件代理 Scriptable 小组件 - 搬瓦工 - WishMeLz KeepAlive.cc 使用笔记,保备案尝鲜版 (方案很多,这只是一类,选择适合自己的即可) - WishMeLz namecrane CraneMail Lifetime 250G 使用记录 沉浸式翻译使用 DeepLX Api Key - WishMeLz ip信息查询 - WishMeLz Teamspeak 3 安装和汉化 - WishMeLz 地址生成器 - WishMeLz 自建Teamspeak3 - WishMeLz
PTT签到脚本 - WishMeLz
Wish · 2024-09-18 · via WishMeLz - 猎奇
PTT签到脚本

https://www.pttime.org/forums.php?action 在这里找到cookie
uid 在个人中心查看

const axios = require("axios");

// 在此处替换为自己的 cookie 和 uid
const cookie = ';
const uid = '';

const headers = {
    accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
    "accept-language": "zh-CN,zh;q=0.9",
    "cache-control": "no-cache",
    cookie: cookie,
    dnt: "1",
    pragma: "no-cache",
    priority: "u=0, i",
    referer: "https://www.pttime.org/",
    "sec-ch-ua": '"Chromium";v="127", "Not)A;Brand";v="99"',
    "sec-ch-ua-arch": '"arm"',
    "sec-ch-ua-bitness": '"64"',
    "sec-ch-ua-full-version": '"127.0.6533.89"',
    "sec-ch-ua-full-version-list": '"Chromium";v="127.0.6533.89", "Not)A;Brand";v="99.0.0.0"',
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-model": '""',
    "sec-ch-ua-platform": '"macOS"',
    "sec-ch-ua-platform-version": '"15.0.0"',
    "sec-fetch-dest": "document",
    "sec-fetch-mode": "navigate",
    "sec-fetch-site": "same-origin",
    "sec-fetch-user": "?1",
    "upgrade-insecure-requests": "1",
    "user-agent":
        "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
};

const url = `https://www.pttime.org/attendance.php?type=sign&uid=${uid}`;

const checkIn = () => {
    axios
        .get(url, { headers })
        .then((response) => {
            const totalSignMatch = response.data.match(/总签到:(\d+) 天/);
            const magicMatch = response.data.match(/获得魔力值:<b>(\d+)<\/b>/);

            if (totalSignMatch && magicMatch) {
                const totalSign = totalSignMatch[1];
                const magic = magicMatch[1];
                console.log(`签到成功!总签到: ${totalSign} 天, 获得魔力值: ${magic}`);
            } else {
                console.log("未找到相关信息,请检查响应内容。");
            }
        })
        .catch((error) => {
            console.error("请求失败:", error);
        });
};

setInterval(() => {
    const now = new Date();
    const currentHour = now.getHours();
    if (currentHour === 6) {
        let newZDate = new Date();
        let strTime = `${newZDate.getFullYear()}-${(newZDate.getMonth() + 1) > 9 ? (newZDate.getMonth() + 1) : '0' + (newZDate.getMonth() + 1)}-${newZDate.getDate() > 9 ? newZDate.getDate() : '0' + newZDate.getDate()} ${newZDate.getHours() > 9 ? newZDate.getHours() : '0' + newZDate.getHours()}:${newZDate.getMinutes() > 9 ? newZDate.getMinutes() : '0' + newZDate.getMinutes()}:${newZDate.getSeconds() > 9 ? newZDate.getSeconds() : '0' + newZDate.getSeconds()}`;
        console.log(strTime);
        checkIn();
    } 
}, 20 * 60 * 1000);