Open TigerCubDen opened 1 year ago
为什么不行啊,填入cookies之后,点击测试会报错
为什么不行啊,填入cookies之后,点击测试会报错
在已登录贴吧的浏览器上访问 http://tieba.baidu.com/tbmall/onekeySignin1 ,是否显示为 error": "forums is signed"
?
如果是,我会给模板再加一个判断,使其在这种情况下显示为“运行成功”
显示的是其他的"error":"there is no forum"
显示的是其他的
"error":"there is no forum"
我测试了下,百度贴吧一键签到api返回逻辑是这样的
"error": "success"
"error": "forums is signed"
"error": "there is no forum"
贴吧官方的自动签到功能只对七级以上的贴吧生效,除非开会员,这是百度的限制。以下是样本(按123顺序):
{
"no": 0,
"error": "success",
"data": {
"signedForumAmount": 8,
"signedForumAmountFail": 0,
"unsignedForumAmount": 0,
"vipExtraSignedForumAmount": 0,
"forum_list": [
{
"forum_id": 77986,
"forum_name": "狼",
"is_sign_in": 1,
"level_id": 10,
"cont_sign_num": 1,
"loyalty_score": {
"normal_score": 2,
"high_score": 14
}
}
],
"gradeNoVip": 2,
"gradeVip": 14
}
}
{
"no": 2280006,
"error": "forums is signed",
"data": {
"signedForumAmount": 9,
"signedForumAmountFail": 0,
"unsignedForumAmount": 0,
"vipExtraSignedForumAmount": 0,
"forum_list": null,
"gradeNoVip": 32,
"gradeVip": 126,
"lowlev_presign": 9
}
}
{
"no": 2500113,
"error": "there is no forum",
"data": {
"signedForumAmount": 8,
"signedForumAmountFail": 0,
"unsignedForumAmount": 1,
"vipExtraSignedForumAmount": 1,
"forum_list": null,
"gradeNoVip": 0,
"gradeVip": 126
}
}
感谢分享!请大佬加一个判断,不然有时候签完第二次运行的时候会提示错误
感谢分享!请大佬加一个判断,不然有时候签完第二次运行的时候会提示错误
我目前打算重做一下,到时不再有7级以下贴吧无法自动签到的官方限制
谢谢大佬
请问大佬,问题修复好没呢?我测试了一下还是失败。。。
Failed at 2/2 request,Fail assert: {"re": "success", "from": "content"} from success_asserts,Request URL: http://tieba.baidu.com/tbmall/onekeySignin1 --请问大佬,问题修复好没呢?我测试了一下还是失败。。。
Failed at 2/2 request,Fail assert: {"re": "success", "from": "content"} from success_asserts,Request URL: http://tieba.baidu.com/tbmall/onekeySignin1 --
新版本已发,等merge
Failed at 7/13 request, Fail assert: {"re": "200", "from": "status"} from success_asserts, Response Error : HTTP 500: The error occurred when rendering template value: http://tieba.baidu.com/f?kw={{ bar |urlencode}} TemplateSyntaxError("unexpected '%'"), Request URL: http://tieba.baidu.com/sign/add
这个请求http://tieba.baidu.com/sign/add
的Referer有问题吧,手动改成http://tieba.baidu.com/f?kw={{ bar |urlencode}}
后可以了
实测还是不行,如下提示:
Failed at 7/13 request,Fail assert: {"re": "200", "from": "status"} from success_asserts,Response Error : HTTP 500: The error occurred when rendering template value: [http://tieba.baidu.com/f?kw={{ bar \|urlencode}}](http://tieba.baidu.com/f?kw={{%C2%A0bar%C2%A0\|urlencode}})TemplateSyntaxError("unexpected '%'"),Request URL: http://tieba.baidu.com/sign/add --这个请求
http://tieba.baidu.com/sign/add
的Referer有问题吧,手动改成http://tieba.baidu.com/f?kw={{ bar |urlencode}}
后可以了
不知道为什么我复制到github的编辑框就被莫名其妙的改了,我重新提交试试
2023-07-19 11:12:19 日志:Failed at 7/13 request, Fail assert: {"re": "200", "from": "status"} from success_asserts, Response Error : HTTP 500: The error occurred when rendering template value: http://tieba.baidu.com/f?kw={{ bar |urlencode}} TemplateSyntaxError("unexpected '%'"), Request URL: http://tieba.baidu.com/sign/add
2023-07-19 11:12:19
日志:Failed at 7/13 request,
Fail assert: {"re": "200", "from": "status"} from success_asserts,
Response Error : HTTP 500: The error occurred when rendering template value: http://tieba.baidu.com/f?kw={{ bar |urlencode}}
TemplateSyntaxError("unexpected '%'"),
Request URL: http://tieba.baidu.com/sign/add
模版更新推送存在延迟,你们可以参照Chidoudou的回答,在模版编辑界面里,把http://tieba.baidu.com/sign/add
的Referer
改成http://tieba.baidu.com/f?kw={{ bar |urlencode}}
应该就可用了。
大佬这个失败是什么情况 Failed at 2/13 request, Fail assert: {"re": "session_id", "from": "content"} from success_asserts, Response Error : OK, Request URL: http://tieba.baidu.com/f/user/json_userinfo?_=1407684256076
Failed at 4/13 request, Fail assert: {"re": "200", "from": "status"} from success_asserts, Response Error : HTTP 500: The error occurred when rendering template url: {% for page in range(1, int(pages) +1) %} TemplateSyntaxError("Unexpected end of template. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'."), Request URL: {% for page in range(1, int(pages) +1) %} 现在又是报这个错,纯小白看不懂。。。之前还成功一次啥也没改现在就这样了
现在在公共模板界面里重建缓存,重新订阅模板,并保持qd框架为最新版本,应该可以解决上述问题。
注:不要在每日 0:00-0:59 高峰期执行签到,否则会报错 {"no":340009,"error":"time error","data":[]}
偶尔会有几个吧漏签到是什么情况?我有63个吧要签
偶尔会有几个吧漏签到是什么情况?我有63个吧要签
经过测试,我怀疑是下述原因:
有些贴吧的名字不再使用或仅为别名,点进去会跳转至另一个名字。
以 “南望山 | 中国地质大学武汉” 为例:
执行 “贴吧一键签到” 任务后,日志显示有一个贴吧未签到 查看关注列表,发现有个名为 “南望山” 的贴吧未能被签到 ↓ 点进或搜索 “南望山” 后,被跳转至 “中国地质大学武汉吧” 无论 “中国地质大学武汉吧” 是否被关注,贴吧关注列表中 “南望山” 必须被移除。
否则,会导致以 “南望山” 吧名签到时,提示 “您还未加入此吧或等级不够”;并算入未签到数(onekeySignin1
的返回信息)。
你需要做的,就是找出并移除这样的吧名。
谢谢解答,不过我这边不是贴吧名不同导致的问题,我现在是设成每天9点和10点各执行一遍,就没有缺漏了,之前只执行一次会出现漏的
贴吧cookie签到.txt 大佬可以参考下这个旧版的,看有没有灵感改进一下,旧版这个没有出现过漏签的
failed at 1/13 request, error:ValueError(u'Unsupported url scheme: api://util/string/replace',), api://util/string/replace
测试了下,可用,非常感谢
failed at 1/13 request, error:ValueError(u'Unsupported url scheme: api://util/string/replace',), api://util/string/replace
请更新qd框架至最新版本
贴吧cookie签到.txt 大佬可以参考下这个旧版的,看有没有灵感改进一下,旧版这个没有出现过漏签的
感谢帮助,我试了下发现签到执行时间大幅延长,因为每个贴吧要执行 https://tieba.baidu.com/f?ie=utf-8&kw={{bar|urlencode}}
获取tbs,我不确定 tbs 有无是否是漏签的罪魁祸首。
所以我打算先捕获到漏签贴吧的日志再做进一步决定;如果确定是该原因或者没有其他更好的办法,再采用上述旧模板。
谢谢解答,不过我这边不是贴吧名不同导致的问题,我现在是设成每天9点和10点各执行一遍,就没有缺漏了,之前只执行一次会出现漏的
运行下面这个用于调试的模板,它会将每一个贴吧的签到信息显示在日志里,如果出现漏签情况,将本次运行日志发送过来就行,谢谢。
使用方法:新建一个空的txt文件,复制以下内容并保存,然后修改后缀为 .har,再导入qd框架里。 运行时 results 参数一栏为空。
[{"comment":"初始化变量","request":{"method":"POST","url":"api://util/string/replace","headers":[],"cookies":[],"data":"r=text&p=&s=1&t="},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"page","re":".*","from":"content"},{"name":"pages","re":".*","from":"content"}]}},{"request":{"method":"GET","url":"http://tieba.baidu.com/f/user/json_userinfo?_=1407684256076","headers":[{"name":"Cookie","value":"{{ cookie }}"},{"name":"DNT","value":"1"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"},{"name":"Accept","value":"*/*"},{"name":"X-Requested-With","value":"XMLHttpRequest"},{"name":"Connection","value":"keep-alive"}],"cookies":[]},"rule":{"success_asserts":[{"re":"session_id","from":"content"}],"failed_asserts":[],"extract_variables":[]}},{"comment":"获取贴吧页数","request":{"method":"GET","url":"https://tieba.baidu.com/f/like/mylike","headers":[{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"Cache-Control","value":"no-cache"},{"name":"Connection","value":"keep-alive"},{"name":"Cookie","value":"{{cookie}}"},{"name":"DNT","value":"1"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"}],"cookies":[]},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"pages","re":"\\d+(?=\">尾页)","from":"content"}]}},{"comment":"For 循环开始","request":{"method":"GET","url":"{% for page in range(1, int(pages) +1) %}","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[]}},{"request":{"method":"GET","url":"https://tieba.baidu.com/f/like/mylike?pn={{page|urlencode}}","headers":[{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"Cache-Control","value":"no-cache"},{"name":"Connection","value":"keep-alive"},{"name":"Cookie","value":"{{cookie}}"},{"name":"DNT","value":"1"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"}],"cookies":[]},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"bar","re":"href=\"/f\\?kw=[^\"]+\" title=\"([^\"]+)\"","from":"content"},{"name":"bars","re":"/href=\"/f\\?kw=[^\"]+\" title=\"([^\"]+)\"/g","from":"content"}]}},{"request":{"method":"GET","url":"{% for bar in bars %}","headers":[],"cookies":[]},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[]}},{"request":{"method":"POST","url":"http://tieba.baidu.com/sign/add","headers":[{"name":"Origin","value":"http://tieba.baidu.com"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"},{"name":"Content-Type","value":"application/x-www-form-urlencoded; charset=UTF-8"},{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"X-Requested-With","value":"XMLHttpRequest"},{"name":"Connection","value":"keep-alive"},{"name":"Referer","value":"http://tieba.baidu.com/f?kw={{ bar |urlencode}}"},{"name":"DNT","value":"1"}],"cookies":[],"data":"ie=utf-8&kw={{ bar |urlencode}}","mimeType":"application/x-www-form-urlencoded; charset=UTF-8"},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"result","re":".*","from":"content"}]}},{"comment":"字符串替换","request":{"method":"GET","url":"api://util/string/replace?r=text&p=&s={{results|urlencode}}%20%7C%20{{bar|urlencode}}%3A{{result|urlencode}}%20&t=","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"results","re":".*","from":"content"}]}},{"request":{"method":"GET","url":"{% endfor %}","headers":[],"cookies":[]},"rule":{"success_asserts":[],"failed_asserts":[],"extract_variables":[]}},{"comment":"延时3秒","request":{"method":"GET","url":"api://util/delay/3","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[]}},{"comment":"For 循环结束","request":{"method":"GET","url":"{% endfor %}","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[],"failed_asserts":[],"extract_variables":[]}},{"request":{"method":"GET","url":"http://tieba.baidu.com/dc/common/tbs","headers":[{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Host","value":"tieba.baidu.com"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"Upgrade-Insecure-Requests","value":"1"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"},{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Cookie","value":"{{cookie}}"},{"name":"Connection","value":"keep-alive"}],"cookies":[]},"rule":{"success_asserts":[{"re":"tbs","from":"content"}],"failed_asserts":[],"extract_variables":[{"re":"{\"tbs\":\"([\\s\\S]*?)\"","from":"content","name":"tbs"}]}},{"request":{"method":"POST","url":"http://tieba.baidu.com/tbmall/onekeySignin1","headers":[{"name":"Cookie","value":"{{cookie}}"},{"name":"Origin","value":"http://tieba.baidu.com"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Host","value":"tieba.baidu.com"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"},{"name":"Content-Type","value":"application/x-www-form-urlencoded; charset=UTF-8"},{"name":"Accept","value":"*/*"},{"name":"Referer","value":"http://tieba.baidu.com/"},{"name":"X-Requested-With","value":"XMLHttpRequest"},{"name":"Connection","value":"keep-alive"}],"cookies":[],"data":"ie=utf-8&tbs={{tbs|urlencode}}","mimeType":"application/x-www-form-urlencoded; charset=UTF-8"},"rule":{"success_asserts":[{"re":"success","from":"content"},{"re":"forums is signed","from":"content"},{"re":"there is no forum","from":"content"}],"failed_asserts":[],"extract_variables":[{"name":"signed","re":"\"signedForumAmount\":\\s?([0-9]*)","from":"content"},{"name":"failed","re":"\"signedForumAmountFail\":\\s?([0-9]*)","from":"content"},{"name":"unsigned","re":"\"unsignedForumAmount\":\\s?([0-9]*)","from":"content"}]}},{"request":{"method":"GET","url":"api://util/string/replace?r=text&p=&s=%E5%B7%B2%E7%AD%BE%E5%88%B0%EF%BC%9A{{signed|urlencode}}%20%E4%B8%AA%EF%BC%8C%E6%9C%AA%E7%AD%BE%E5%88%B0%EF%BC%9A{{unsigned|urlencode}}%20%E4%B8%AA%EF%BC%8C%E5%A4%B1%E8%B4%A5%E6%95%B0%EF%BC%9A{{failed|urlencode}}%20%E4%B8%AA%20-%20%E8%B0%83%E8%AF%95%E4%BF%A1%E6%81%AF%EF%BC%9A{{results|urlencode}}&t=","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"log","re":".*","from":"content"}]}},{"comment":"Unicode转换","request":{"method":"POST","url":"api://util/unicode","headers":[],"cookies":[],"data":"html_unescape=false&content={{log}}"},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"__log__","re":"\"转换后\": \"(.*)\"","from":"content"}]}}]
谢谢解答,不过我这边不是贴吧名不同导致的问题,我现在是设成每天9点和10点各执行一遍,就没有缺漏了,之前只执行一次会出现漏的
运行下面这个用于调试的模板,它会将每一个贴吧的签到信息显示在日志里,如果出现漏签情况,将本次运行日志发送过来就行,谢谢。
使用方法:新建一个空的txt文件,复制以下内容并保存,然后修改后缀为 .har,再导入qd框架里。 运行时 results 参数一栏为空。
[{"comment":"初始化变量","request":{"method":"POST","url":"api://util/string/replace","headers":[],"cookies":[],"data":"r=text&p=&s=1&t="},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"page","re":".*","from":"content"},{"name":"pages","re":".*","from":"content"}]}},{"request":{"method":"GET","url":"http://tieba.baidu.com/f/user/json_userinfo?_=1407684256076","headers":[{"name":"Cookie","value":"{{ cookie }}"},{"name":"DNT","value":"1"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"},{"name":"Accept","value":"*/*"},{"name":"X-Requested-With","value":"XMLHttpRequest"},{"name":"Connection","value":"keep-alive"}],"cookies":[]},"rule":{"success_asserts":[{"re":"session_id","from":"content"}],"failed_asserts":[],"extract_variables":[]}},{"comment":"获取贴吧页数","request":{"method":"GET","url":"https://tieba.baidu.com/f/like/mylike","headers":[{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"Cache-Control","value":"no-cache"},{"name":"Connection","value":"keep-alive"},{"name":"Cookie","value":"{{cookie}}"},{"name":"DNT","value":"1"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"}],"cookies":[]},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"pages","re":"\\d+(?=\">尾页)","from":"content"}]}},{"comment":"For 循环开始","request":{"method":"GET","url":"{% for page in range(1, int(pages) +1) %}","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[]}},{"request":{"method":"GET","url":"https://tieba.baidu.com/f/like/mylike?pn={{page|urlencode}}","headers":[{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"Cache-Control","value":"no-cache"},{"name":"Connection","value":"keep-alive"},{"name":"Cookie","value":"{{cookie}}"},{"name":"DNT","value":"1"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"}],"cookies":[]},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"bar","re":"href=\"/f\\?kw=[^\"]+\" title=\"([^\"]+)\"","from":"content"},{"name":"bars","re":"/href=\"/f\\?kw=[^\"]+\" title=\"([^\"]+)\"/g","from":"content"}]}},{"request":{"method":"GET","url":"{% for bar in bars %}","headers":[],"cookies":[]},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[]}},{"request":{"method":"POST","url":"http://tieba.baidu.com/sign/add","headers":[{"name":"Origin","value":"http://tieba.baidu.com"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"},{"name":"Content-Type","value":"application/x-www-form-urlencoded; charset=UTF-8"},{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"X-Requested-With","value":"XMLHttpRequest"},{"name":"Connection","value":"keep-alive"},{"name":"Referer","value":"http://tieba.baidu.com/f?kw={{ bar |urlencode}}"},{"name":"DNT","value":"1"}],"cookies":[],"data":"ie=utf-8&kw={{ bar |urlencode}}","mimeType":"application/x-www-form-urlencoded; charset=UTF-8"},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"result","re":".*","from":"content"}]}},{"comment":"字符串替换","request":{"method":"GET","url":"api://util/string/replace?r=text&p=&s={{results|urlencode}}%20%7C%20{{bar|urlencode}}%3A{{result|urlencode}}%20&t=","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"results","re":".*","from":"content"}]}},{"request":{"method":"GET","url":"{% endfor %}","headers":[],"cookies":[]},"rule":{"success_asserts":[],"failed_asserts":[],"extract_variables":[]}},{"comment":"延时3秒","request":{"method":"GET","url":"api://util/delay/3","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[]}},{"comment":"For 循环结束","request":{"method":"GET","url":"{% endfor %}","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[],"failed_asserts":[],"extract_variables":[]}},{"re ![QQ图片20230724183809](https://github.com/qd-today/templates/assets/126320405/37228ee0-74a6-416a-a6c8-d4199068a6da) quest":{"method":"GET","url":"http://tieba.baidu.com/dc/common/tbs","headers":[{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Host","value":"tieba.baidu.com"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"Upgrade-Insecure-Requests","value":"1"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"},{"name":"Accept","value":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"},{"name":"Cookie","value":"{{cookie}}"},{"name":"Connection","value":"keep-alive"}],"cookies":[]},"rule":{"success_asserts":[{"re":"tbs","from":"content"}],"failed_asserts":[],"extract_variables":[{"re":"{\"tbs\":\"([\\s\\S]*?)\"","from":"content","name":"tbs"}]}},{"request":{"method":"POST","url":"http://tieba.baidu.com/tbmall/onekeySignin1","headers":[{"name":"Cookie","value":"{{cookie}}"},{"name":"Origin","value":"http://tieba.baidu.com"},{"name":"Accept-Encoding","value":"gzip, deflate, br"},{"name":"Host","value":"tieba.baidu.com"},{"name":"Accept-Language","value":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"},{"name":"User-Agent","value":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.82"},{"name":"Content-Type","value":"application/x-www-form-urlencoded; charset=UTF-8"},{"name":"Accept","value":"*/*"},{"name":"Referer","value":"http://tieba.baidu.com/"},{"name":"X-Requested-With","value":"XMLHttpRequest"},{"name":"Connection","value":"keep-alive"}],"cookies":[],"data":"ie=utf-8&tbs={{tbs|urlencode}}","mimeType":"application/x-www-form-urlencoded; charset=UTF-8"},"rule":{"success_asserts":[{"re":"success","from":"content"},{"re":"forums is signed","from":"content"},{"re":"there is no forum","from":"content"}],"failed_asserts":[],"extract_variables":[{"name":"signed","re":"\"signedForumAmount\":\\s?([0-9]*)","from":"content"},{"name":"failed","re":"\"signedForumAmountFail\":\\s?([0-9]*)","from":"content"},{"name":"unsigned","re":"\"unsignedForumAmount\":\\s?([0-9]*)","from":"content"}]}},{"request":{"method":"GET","url":"api://util/string/replace?r=text&p=&s=%E5%B7%B2%E7%AD%BE%E5%88%B0%EF%BC%9A{{signed|urlencode}}%20%E4%B8%AA%EF%BC%8C%E6%9C%AA%E7%AD%BE%E5%88%B0%EF%BC%9A{{unsigned|urlencode}}%20%E4%B8%AA%EF%BC%8C%E5%A4%B1%E8%B4%A5%E6%95%B0%EF%BC%9A{{failed|urlencode}}%20%E4%B8%AA%20-%20%E8%B0%83%E8%AF%95%E4%BF%A1%E6%81%AF%EF%BC%9A{{results|urlencode}}&t=","headers":[],"cookies":[],"data":""},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[{"name":"__log__","re":".*","from":"content"}]}}]
大佬日志会生成乱码,
\u 开头的内容,只需要Unicode编码转中文。 @EdisonCh4n 我更新了上面的模板,做了自动编码转换,你重新导入运行就可以了
太感谢了!
\u 开头的内容,只需要Unicode编码转中文。 @EdisonCh4n 我更新了上面的模板,做了自动编码转换,你重新导入运行就可以了 大佬这个多出来的部分是啥?
\u 开头的内容,只需要Unicode编码转中文。 @EdisonCh4n 我更新了上面的模板,做了自动编码转换,你重新导入运行就可以了
大佬这个多出来的部分是啥?
啊,这个模版是用来调试问题的,日常使用直接在qd框架的公共模版界面里订阅就行
框架是20230228,是版本低了吗?
2023-07-25 15:03:46 日志:Failed at 4/13 request, Fail assert: {"re": "200", "from": "status"} from success_asserts, Response Error : HTTP 500: The error occurred when rendering template url: {% for page in range(1, int(pages) +1) %} TemplateSyntaxError("Unexpected end of template. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'."), Request URL: {% for page in range(1, int(pages) +1) %}
框架是20230228,是版本低了吗?
2023-07-25 15:03:46 日志:Failed at 4/13 request, Fail assert: {"re": "200", "from": "status"} from success_asserts, Response Error : HTTP 500: The error occurred when rendering template url: {% for page in range(1, int(pages) +1) %} TemplateSyntaxError("Unexpected end of template. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'."), Request URL: {% for page in range(1, int(pages) +1) %}
是的,请更新至最新版本。
最新版本(20230718) 依然报错:
Failed at 2/13 request,
Fail assert: {"re": "session_id", "from": "content"} from success_asserts,
Request URL: http://tieba.baidu.com/f/user/json_userinfo?_=1407684256076
看来还是没弄好么?
最新版本(20230718) 依然报错:
Failed at 2/13 request, Fail assert: {"re": "session_id", "from": "content"} from success_asserts, Request URL: http://tieba.baidu.com/f/user/json_userinfo?_=1407684256076
用浏览器访问 https://tieba.baidu.com/f/user/json_userinfo?_=1407684256076
如果能够返回一串 session_id,复制该页面使用的cookie到qd框架里,否则尝试重新登录。
运行失败:request limit
问一下你关注了多少个贴吧?我看了下qd框架的任务请求次数限制,默认为1500次。如果不是网站管理员修改了默认了配置,几乎不可能达到限额。
问一下你关注了多少个贴吧?我查看了下qd框架的任务请求次数限制,默认为1500次。如果不是网站管理员修改了默认配置,几乎不可能达到规避。
找到原因了,管理员把请求次数设置为50次了; 关注了60个贴吧,谢谢大佬
最新版本(20230718) 依然报错:
Failed at 2/13 request, Fail assert: {"re": "session_id", "from": "content"} from success_asserts, Request URL: http://tieba.baidu.com/f/user/json_userinfo?_=1407684256076
用浏览器访问
https://tieba.baidu.com/f/user/json_userinfo?_=1407684256076
如果能够返回一串 session_id,复制该页面使用的cookie到qd框架里,否则尝试重新登录。
谢谢指点
解决了,应该是登录的IP 引起的,在公司电信网络获取的Cookie没办法在家里的服务器上使用,我在家里使用docker运行了一个浏览器获取cookie后,签到就正常了
大佬,只能签100个吧吗,我运行两次也还是没签剩下的
我这边自动签到只能签7级以上的吧,但是手动点击签到可以签所以的吧(无论是否达到7级),请问这是什么原因导致的,有解决办法吗?
大佬,只能签100个吧吗,我运行两次也还是没签剩下的
参考我的这条回复,我需要日志来确定出了什么问题:https://github.com/qd-today/templates/issues/393#issuecomment-1647644589
只能签到100个是怎么回事
Failed at 7/13 request, Fail assert: {"re": "200", "from": "status"} from success_asserts, Response Error : HTTP 599: Connection timed out after 30000 milliseconds, Request URL: http://tieba.baidu.com/sign/add
2023-11-23 2:18:03 | 成功 | 已签到:100 个,未签到:100 个,失败数:0 个 -- | -- | -- 只能签到100个是怎么回事
参考我的这条回复,我需要日志来确定出了什么问题:https://github.com/qd-today/templates/issues/393#issuecomment-1647644589
HAR 模板名称
贴吧一键签到
作者信息
qiandao.today,TigerCubDen
模板备注及说明
模拟网页端对用户已关注的所有贴吧一键自动签到 填入在百度贴吧登录后的cookie即可
HAR 文件名
贴吧一键签到cookie.har
其他信息
HAR 模板内容