Skip to content

Instantly share code, notes, and snippets.

# 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)