ludoux / ngapost2md

艾泽拉斯国家地理论坛/NGA玩家社区/NGA单帖爬虫/牛国安一键存贴,不怕冲水
MIT License
98 stars 10 forks source link

只看作者的帖子该咋保存? #26

Closed wangjian124 closed 3 years ago

wangjian124 commented 3 years ago

我刚设置了authorid,但好像page会无限增大,有啥解决方法吗

ludoux commented 3 years ago

简单看了一下,page不增大(及认为到达的末尾)的条件判断是81行(返回True认为没结束,154行页数加)。但是问题是尽管加了只看楼主,但是返回数据中replies字段值仍然是原帖的所有回复数,就会导致一直尝试不断翻页。

最好的解决方法便是找到网页前端(或者开源版)怎么精准判断出是否到达最后一页,或者总共有多少页的方法。

比较粗糙的解决方法是可以强制加一个翻页上线,翻页尝试多少次后就终止。


From: 王鉴 @.> Sent: Thursday, July 15, 2021 9:17:01 PM To: ludoux/ngapost2md @.> Cc: Subscribed @.***> Subject: [ludoux/ngapost2md] 只看作者的帖子该咋保存? (#26)

我刚设置了authorid,但好像page会无限增大,有啥解决方法吗

― You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ludoux/ngapost2md/issues/26, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGWKTHBM5FWPEHQXXLGRXDTX3NU3ANCNFSM5ANRBYCQ.

wangjian124 commented 3 years ago

试了用翻页成功解决了。。顺便想问下,ngaPassportCid这个是在哪找呢。。谢谢~

ludoux commented 3 years ago

@.*D77BFD.C242D0A0]登录后按F12打开开发者面板,切换到网络Tab,刷新页面,查看相应的网络请求中的请求Cookie**字段即可。

发件人: @.> 发送时间: 2021年7月18日 17:49 收件人: @.> 抄送: Lu @.>; @.> 主题: Re: [ludoux/ngapost2md] 只看作者的帖子该咋保存? (#26)

试了用翻页成功解决了。。顺便想问下,ngaPassportCid这个是在哪找呢。。谢谢~

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ludoux/ngapost2md/issues/26#issuecomment-882030517, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGWKTFGZPKFJY26BA5SDDDTYKPRJANCNFSM5ANRBYCQ.