Open Wangfugui110 opened 1 year ago
第一页这个结构是对的,主要问题应该是后续获取的数据结构问题,可以修改下代码看看返回的数据问题 了解一点编程的话可以尝试本地运行打断点或者直接跑主分支 test 的代码,看看脚本的请求参数和实际请求参数直接存在哪些差异
// Sign_Weibo.js line 216
res_obj = res.data;
+ console.log(res_obj);
// Sign_Weibo.js line 227
since_id = card_list_info.since_id;
+ console.log(since_id);
应该是参数有问题,具体看这个 issue https://github.com/Hellager/weibo_supertopic_sign/issues/24
关注下 containerid
if(res_obj.cards.length>0){
let card_group = res_obj.cards[0].card_group;
let card_list_info = res_obj.cardlistInfo;
since_id = card_list_info.since_id;
console.log(since_id);
try {
page = JSON.parse(since_id).page.toString();
} catch {
page = (parseInt(page) + 1).toString();
}
for (const item of card_group) {
if (item.card_type === '8') {
const page_index = item.itemid.slice(item.itemid.indexOf('follow_super_follow_') + 'follow_super_follow_'.length, item.itemid.length);
const topic = {
title: item.title_sub,
level: item.desc1.slice(item.desc1.indexOf('.') + 1, item.desc1.length),
sign_status: item.buttons[0].name,
sign_action: item.buttons[0].name === '已签' ? '' : item.buttons[0].params.action,
since_id: since_id,
page: page_index.split('_')[0],
}
follow_list.push(topic);
}
}
log.info(`获取超话列表第 ${page-1} 页数据成功`);
} else{
since_id = '0';
}
处理了一下空指针问题,解决问题
@1018987534 这个好这个好,我改一下
geng'x更新了最新代码后第一天签到还是正常后面就获取不到第二页了,现在显示为超时
取消关注几个后就正常了
stream对链接请求重放也是可以获取到所有超话名字的,15个以内的话可以正常跑