好的,所以我编写了一些代码,出于所有意图和目的,它们应该可以工作:
def checkComments(comments):
for comment in comments:
print comment.body
checkComments(comment.replies)
def processSub(sub):
sub.replace_more_comments(limit=None, threshold=0)
checkComments(sub.comments)
#login and subreddit init stuff here
subs = mysubreddit.get_hot(limit=25)
for sub in subs:
processSub(sub)
但是,给定一个包含 50 个嵌套回复的评论的提交,如下所示:
root comment
-> 1st reply
-> 2nd reply
-> 3rd reply
...
-> 50th reply
上面的代码只打印:
root comment
1st reply
2nd reply
3rd reply
4th reply
5th reply
6th reply
7th reply
8th reply
9th reply
知道如何获得剩余的 41 级回复吗?或者这是一个虾限制?