I'm trying to retrieve the last 1000 comments from a user since 1000 is the Reddit limit.
I followed the code example here, and modified a few of the calls for the updated API. Such as user.get_comments now seems to be just user.comments.
Here is the code I've run.
import praw
my_user_agent = 'USERAGENT'
my_client_id = 'CLIENTID'
my_client_secret = 'SECRET'
r = praw.Reddit(user_agent=my_user_agent,
client_id=my_client_id,
client_secret=my_client_secret)
user = r.redditor('REDDITUSERNAME')
for comment in user.comments(limit=None):
print comment.body
I get an error every time on the last line, though.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'SubListing' object is not callable
I have connected to the API and have an active connection as I can do print(user.comment_karma) and it displays correctly.
Any ideas what I'm doing wrong?