我正在阅读 doc for get_comments
而且我不知道 time
参数的正确输入是什么。我知道默认值是“全部”,但我是输入具体日期,还是必须输入“天”、“周”等词?
假设我想获得用户在一周内发表的评论,会不会是这样的:
r = praw.Reddit(user_agent='blah')
user = r.get_redditor(username)
comments = user.get_comments(sort='new', time='week', limit=None)
最佳答案
你可以在source code中看到time
参数作为 t
传递给 API。根据Reddit API documentation :
t
: one of (hour
,day
,week
,month
,year
,all
)
关于python - 如何使用 PRAW 获取上周的评论?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27768132/