This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Grabs the best comments and splits into parts | |
import praw, re | |
r = praw.Reddit() | |
thread = r.submission(url=URL) | |
thread.comment_sort = 'best' # get the best comments from the thread | |
for comment in thread.comments: | |
punctuation_reg = re.compile('(?<=[.!,?:;-]) +') | |
split_parts = punctuation_reg.split(comment.body) |