Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Created on Sep 18, 2017
- @author: Seth
- '''
- import praw
- import collections
- from praw.models import MoreComments
- import time
- reddit = praw.Reddit(client_id='wJ8TIOqn_jW3lQ',
- client_secret='0uXoA4p-KU0DvyUW8rau6L-Po28',
- user_agent='Python fake finder v1.0 (by /u/imalittletestbot)',
- username='imalittletestbot',
- password='stoutandshort')
- '''submission = next(reddit.subreddit('Politics').hot(limit=4))'''
- for submission in reddit.subreddit('Politics').new(limit=4):
- time.sleep(3)
- '''submission.comments.replace_more(limit=None, threshold=2)'''
- while True:
- try:
- submission.comments.replace_more()
- break
- except PossibleExceptions:
- print('Handling replace_more exception')
- sleep(1)
- comments = submission.comments.list()
- print(submission.title)
- for comment in comments:
- if comment.author is not None:
- print(comment.author.name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement