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

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

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);