kuku3863/sign_weibo_chaohua

获取不到since_id这个参数

Opened this issue · 11 comments

开始执行... 2023-12-03 13:04:09

用户名: *
Traceback (most recent call last):
File "/ql/data/scripts/weibo_sign.py", line 162, in
weibo_signer.main() # 或者其他调用逻辑
File "/ql/data/scripts/weibo_sign.py", line 125, in main
since_id = weibo_signer.get_since_id()
File "/ql/data/scripts/weibo_sign.py", line 74, in get_since_id
return data["cardlistInfo"]["since_id"]
KeyError: 'since_id'

执行结束... 2023-12-03 13:04:10 耗时 1 秒

看抓包结果也没有找打since_id这个参数,请问这个参数是做什么用的?

是最近抓的url吗?
微博好像更新了接口,新接口返回的参数里没有since_id这个值。
可以尝试手动替换一下,把新抓的包里的"fid"和"containerid"替换为旧url里的对应值。
旧url里的应该是"xxxxxx_-followsuper"(xxxxxx为6位数字 好像每个人的不一样 我的是100803 可以参考)
新url里是"xxxxxx
-_bottom_mine_followed"(xxxxxx为6位数字 好像每个人的不一样 我的是232478 可以参考)
替换之后应该就可以正常运行了,至少我的是这样。

总结:抓包 → Ctrl+F → "fid" 和 "containerid" → 把"xxxxxx_-bottom_mine_followed"替换为"xxxxxx-_followsuper"

是最近抓的url吗? 微博好像更新了接口,新接口返回的参数里没有since_id这个值。 可以尝试手动替换一下,把新抓的包里的"fid"和"containerid"替换为旧url里的对应值。 旧url里的应该是"xxxxxx_-followsuper"(xxxxxx为6位数字 好像每个人的不一样 我的是100803 可以参考) 新url里是"xxxxxx-_bottom_mine_followed"(xxxxxx为6位数字 好像每个人的不一样 我的是232478 可以参考) 替换之后应该就可以正常运行了,至少我的是这样。

总结:抓包 → Ctrl+F → "fid" 和 "containerid" → 把"xxxxxx_-bottom_mine_followed"替换为"xxxxxx-_followsuper"

你好表哥,替换完依旧不能进行签到,青龙面板一直在重复以下内容 用户名: xxxxxxx

'cardlistInfo'

是最近抓的url吗? 微博好像更新了接口,新接口返回的参数里没有since_id这个值。 可以尝试手动替换一下,把新抓的包里的"fid"和"containerid"替换为旧url里的对应值。 旧url里的应该是"xxxxxx_-followsuper"(xxxxxx为6位数字 好像每个人的不一样 我的是100803 可以参考) 新url里是"xxxxxx-bottom_mine_followed"(xxxxxx为6位数字 好像每个人的不一样 我的是232478 可以参考) 替换之后应该就可以正常运行了,至少我的是这样。
总结:抓包 → Ctrl+F → "fid" 和 "containerid" → 把"xxxxxx
-bottom_mine_followed"替换为"xxxxxx-_followsuper"

你好表哥,替换完依旧不能进行签到,青龙面板一直在重复以下内容 用户名: xxxxxxx

'cardlistInfo'

https://api.weibo.cn/2/cardlist?gsid=[xxxx]&wm=3333_2001&launchid=10000365--x&b=0&from=[xxxx]&c=iphone&networktype=wifi&v_p=90&skin=default&v_f=1&s=[xxxx]&lang=zh_CN&sflag=1&ua=iPhone13,2__weibo__13.9.2__iphone__os15.4&ft=0&aid=[xxxx]&sg_top_super_group_enable=1&tz=Asia%2FShanghai&pd_redpacket2022_enable=1&sg_group_switch=1&client_key=[xxxx]&is_push_alert=1&card159164_emoji_enable=1&fid=100803_-followsuper&refresh_type=0&uicode=[xxxx]&count=20&card242_info_enable=1&sg_page_clock_in=1&profile_toolbar_refactor=1&need_new_pop=1&image_type=heif&moduleID=pagecard&sourcetype=page&need_head_cards=1&containerid=100803-followsuper&sg_card1013_enable=1&luicode=10000011&orifid=profile_me%24%24231093-chaohua&oriuicode=10000011_10000011&qa_optimize_enable=1&page=1&enable_card214_hot_discuss=1&lcardid=&st_bottom_bar_new_style_enable=1&sys_notify_open=1&lfid=231093-_chaohua&sgtotal_activity_enable=1&ul_sid=[xxxx]&ul_hid=[xxxx]&ul_ctime=[xxxx]

你自己抓个包 把我上面这段里的[xxxx]替换为你自己的内容试一试 如果脚本无法运行 就手动打开这段url看报什么错
替换的时候注意看一下其他参数 如果有不同的最好也替换一下

看了下楼主的代码逻辑,发现不止since_id获取不到,因为微博换了接口之后,button按钮也是查询不到签到按钮的。
这里参考了另一位大佬的思路,用微博国际站抓包微调代码之后应该可以跑通。
https://github.com/Hellager/weibo_supertopic_sign

[]&lang=zh_CN&sflag=1&ua=iPhone13,2__weibo__13.9.2__iphone__os15.4&ft=0&aid=[xxxx]&sg_top_super_group_enable=1&tz=Asia%2FShanghai&pd_redpacket2022_enable=1&sg_group_switch=1&client_key=[xxxx]&is_push_alert=1&card159164_emoji_enable=1&fid=100803_-followsuper&refresh_type=0&uicode=[xxxx]&count=20&card242_info_enable=1&sg_page_clock_in=1&profile_toolbar_refactor=1&need_new_pop=1&image_type=heif&moduleID=pagecard&sourcetype=page&need_head_cards=1&containerid=100803-followsuper&sg_card1013_enable=1&luicode=10000011&orifid=profile_me%24%24231093-chaohua&oriuicode=10000011_10000011&qa_optimize_enable=1&page=1&enable_card214_hot_discuss=1&lcardid=&st_bottom_bar_new_style_enable=1&sys_notify_open=1&lfid=231093-_chaohua&sgtotal_activity_enable=1&ul_sid=[xxxx]&ul_hid=[xxxx]&ul_ctime=[xxxx]](https://api.weibo.cn/2/cardlist?gsid=%5Bxxxx%5D&wm=3333_2001&launchid=10000365--x&b=0&from=%5Bxxxx%5D&c=iphone&networktype=wifi&v_p=90&skin=default&v_f=1&s=%5Bxxxx%5D&lang=zh_CN&sflag=1&ua=iPhone13,2__weibo__13.9.2__iphone__os15.4&ft=0&aid=%5Bxxxx%5D&sg_top_super_group_enable=1&tz=Asia%2FShanghai&pd_redpacket2022_enable=1&sg_group_switch=1&client_key=%5Bxxxx%5D&is_push_alert=1&card159164_emoji_enable=1&fid=100803_-_followsuper&refresh_type=0&uicode=%5Bxxxx%5D&count=20&card242_info_enable=1&sg_page_clock_in=1&profile_toolbar_refactor=1&need_new_pop=1&image_type=heif&moduleID=pagecard&sourcetype=page&need_head_cards=1&containerid=100803_-_followsuper&sg_card1013_enable=1&luicode=10000011&orifid=profile_me%24%24231093_-_chaohua&oriuicode=10000011_10000011&qa_optimize_enable=1&page=1&enable_card214_hot_discuss=1&lcardid=&st_bottom_bar_new_style_enable=1&sys_notify_open=1&lfid=231093_-_chaohua&sgtotal_activity_enable=1&ul_sid=%5Bxxxx%5D&ul_hid=%5Bxxxx%5D&ul_ctime=%5Bxxxx%5D)

感谢表哥回复,多次尝试,目前还是不行

看了下楼主的代码逻辑,发现不止since_id获取不到,因为微博换了接口之后,button按钮也是查询不到签到按钮的。 这里参考了另一位大佬的思路,用微博国际站抓包微调代码之后应该可以跑通。 https://github.com/Hellager/weibo_supertopic_sign

请问需要更改哪些地方,主要想挂在青龙签到

今天账号过期了,然后怎么也签不上,尝试了几种方法,最后成功。

  1. 通过爱思助手下载了旧IOS微博12.11版本,
  2. 抓包/cardlist ,
  3. 替换 ,找到新抓包cardlist请求这一行[gsid=_XXXXXXXXXXXXXXXXXXXXX=iPhone12,5__weibo__12.11.0__iphone__os17.2]替换了旧脚本文件对应参数,成功。
    此方法仅限于旧脚本能签到,现在过期,如果没有通过老接口抓包,不知道如何解决。

今天账号过期了,然后怎么也签不上,尝试了几种方法,最后成功。

  1. 通过爱思助手下载了旧IOS微博12.11版本,
  2. 抓包/cardlist ,
  3. 替换 ,找到新抓包cardlist请求这一行[gsid=_XXXXXXXXXXXXXXXXXXXXX=iPhone12,5__weibo__12.11.0__iphone__os17.2]替换了旧脚本文件对应参数,成功。
    此方法仅限于旧脚本能签到,现在过期,如果没有通过老接口抓包,不知道如何解决。

超话这边更新了,相对应的,我代码也更新了,可以看看最新的代码,试试

看了下楼主的代码逻辑,发现不止since_id获取不到,因为微博换了接口之后,button按钮也是查询不到签到按钮的。 这里参考了另一位大佬的思路,用微博国际站抓包微调代码之后应该可以跑通。 https://github.com/Hellager/weibo_supertopic_sign

请问需要更改哪些地方,主要想挂在青龙签到

代码已修改

[]&lang=zh_CN&sflag=1&ua=iPhone13,2__weibo__13.9.2__iphone__os15.4&ft=0&aid=[xxxx]&sg_top_super_group_enable=1&tz=Asia%2FShanghai&pd_redpacket2022_enable=1&sg_group_switch=1&client_key=[xxxx]&is_push_alert=1&card159164_emoji_enable=1&fid=100803_-followsuper&refresh_type=0&uicode=[xxxx]&count=20&card242_info_enable=1&sg_page_clock_in=1&profile_toolbar_refactor=1&need_new_pop=1&image_type=heif&moduleID=pagecard&sourcetype=page&need_head_cards=1&containerid=100803-followsuper&sg_card1013_enable=1&luicode=10000011&orifid=profile_me%24%24231093-chaohua&oriuicode=10000011_10000011&qa_optimize_enable=1&page=1&enable_card214_hot_discuss=1&lcardid=&st_bottom_bar_new_style_enable=1&sys_notify_open=1&lfid=231093-_chaohua&sgtotal_activity_enable=1&ul_sid=[xxxx]&ul_hid=[xxxx]&ul_ctime=[xxxx]](https://api.weibo.cn/2/cardlist?gsid=%5Bxxxx%5D&wm=3333_2001&launchid=10000365--x&b=0&from=%5Bxxxx%5D&c=iphone&networktype=wifi&v_p=90&skin=default&v_f=1&s=%5Bxxxx%5D&lang=zh_CN&sflag=1&ua=iPhone13,2__weibo__13.9.2__iphone__os15.4&ft=0&aid=%5Bxxxx%5D&sg_top_super_group_enable=1&tz=Asia%2FShanghai&pd_redpacket2022_enable=1&sg_group_switch=1&client_key=%5Bxxxx%5D&is_push_alert=1&card159164_emoji_enable=1&fid=100803_-_followsuper&refresh_type=0&uicode=%5Bxxxx%5D&count=20&card242_info_enable=1&sg_page_clock_in=1&profile_toolbar_refactor=1&need_new_pop=1&image_type=heif&moduleID=pagecard&sourcetype=page&need_head_cards=1&containerid=100803_-_followsuper&sg_card1013_enable=1&luicode=10000011&orifid=profile_me%24%24231093_-_chaohua&oriuicode=10000011_10000011&qa_optimize_enable=1&page=1&enable_card214_hot_discuss=1&lcardid=&st_bottom_bar_new_style_enable=1&sys_notify_open=1&lfid=231093_-_chaohua&sgtotal_activity_enable=1&ul_sid=%5Bxxxx%5D&ul_hid=%5Bxxxx%5D&ul_ctime=%5Bxxxx%5D)

感谢表哥回复,多次尝试,目前还是不行

已修改