qd-today / templates

基于开源新版 QD 框架站发布的公共har模板库,仅供示例
1.07k stars 292 forks source link

PT通用签到保号 讨论区 #328

Open IITII opened 1 year ago

IITII commented 1 year ago

HAR 模板名称

PT通用签到保号

作者信息

IITII

模板备注及说明

用户 Cookies 请通过 F12 在 .php 请求获取. 签到结果获取目前只适配了原版 NexusPHP

HAR 文件名

PT通用签到保号.har

其他信息

HAR 模板内容

[
    {
        "request": {
            "method": "GET",
            "url": "https://{{domain}}/attendance.php",
            "headers": [
                {
                    "name": ":method",
                    "value": "GET"
                },
                {
                    "name": ":path",
                    "value": "/attendance.php"
                },
                {
                    "name": "upgrade-insecure-requests",
                    "value": "1"
                },
                {
                    "name": "dnt",
                    "value": "1"
                },
                {
                    "name": "user-agent",
                    "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"
                },
                {
                    "name": "accept",
                    "value": "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.9"
                },
                {
                    "name": "sec-fetch-site",
                    "value": "same-origin"
                },
                {
                    "name": "sec-fetch-mode",
                    "value": "navigate"
                },
                {
                    "name": "sec-fetch-user",
                    "value": "?1"
                },
                {
                    "name": "sec-fetch-dest",
                    "value": "document"
                },
                {
                    "name": "accept-encoding",
                    "value": "gzip, deflate, br"
                },
                {
                    "name": "accept-language",
                    "value": "zh-CN,zh;q=0.9"
                },
                {
                    "name": "cookie",
                    "value": "{{cookie}}"
                }
            ],
            "cookies": []
        },
        "rule": {
            "success_asserts": [
                {
                    "re": "200",
                    "from": "status"
                }
            ],
            "failed_asserts": [
                {
                    "re": "关闭维护",
                    "from": "content"
                }
            ],
            "extract_variables": [
                {
                    "name": "recheck_cnt",
                    "re": "第[\\s\\S]+今日签到排名:<b>\\d+</b> / <b>\\d+</b>",
                    "from": "content"
                },
                {
                    "name": "traffic",
                    "re": "分享率[:][\\s\\S]+当前活动",
                    "from": "content"
                }
            ]
        }
    },
    {
        "comment": "字符串替换",
        "request": {
            "method": "POST",
            "url": "api://util/string/replace",
            "headers": [],
            "cookies": [],
            "data": "r=text&p=当前活动&t=&s={{domain}}: {{traffic | striptags}} {{regex_replace(recheck_cnt | striptags, \"点击[\\s\\S]+目前\", \"\")}}"
        },
        "rule": {
            "success_asserts": [
                {
                    "re": "200",
                    "from": "status"
                },
                {
                    "re": "\"状态\": \"OK\"",
                    "from": "content"
                }
            ],
            "failed_asserts": [],
            "extract_variables": [
                {
                    "name": "__log__",
                    "re": ".*",
                    "from": "content"
                }
            ]
        }
    }
]
NOwin111 commented 1 year ago

没有签到功能的站点可以用吗?

IITII commented 1 year ago

没有签到功能的站点可以用吗?

那你用通用保号呗。。。

zshvn commented 1 year ago

不懂就问。。regex_replace 该填什么。。签到可以签就是提示失败

IITII commented 1 year ago

订阅模板使用即可, regex_replace 该填什么无需 care

liulrc commented 5 months ago

日志:Failed at 2/2 request, Fail assert: {"re": "\"状态\": \"OK\"", "from": "content"} from success_asserts, Response Error : HTTP 500: The error occurred when rendering template data: r=text&p=当前活动&t=&s={{domain}}: {{traffic | striptags}} {{regex_replace(recheck_cnt | striptags, "点击[\s\S]+目前", "")}} TypeError("'str' object is not callable"), Request URL: api://util/string/replace

请教这是什么报错?