【发布时间】:2014-08-21 00:58:21
【问题描述】:
好的,所以我编写了一些代码,无论出于何种意图和目的,它们都应该可以工作:
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 级回复吗?或者这是一个 praw 限制?
【问题讨论】: