Skip to content

Instantly share code, notes, and snippets.

@evmcheb
Last active October 16, 2020 04:06
Show Gist options
  • Save evmcheb/003d589bd32fc06f8e77fe264b623cbe to your computer and use it in GitHub Desktop.
Save evmcheb/003d589bd32fc06f8e77fe264b623cbe to your computer and use it in GitHub Desktop.
# 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)
parts = list(filter(None, split_parts))
# create image from parts
@babli514
Copy link

Hi. Me too I'm interested in the full code. Can you share it please?

Copy link

ghost commented Dec 24, 2019

Hello, If you could provide the whole file for this portion of the project, that would make my world. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment