JerryQu2

u/JerryQu2


r/pushshift•

Hey! I'm trying to find the best way to create sequences of threads. For example, if a submission has two direct comments, which both have 2 replies, I want to have 4 sequences going from the submission down to each 'leaf' comment.

How I can imagine doing this with what I know:

  1. Get all comments from submission
  2. Use comment/?parent_id=####### on each comment
  3. Remove comments from #1, if encountered through #2
  4. Repeat on new comments until no more

Is there a more efficient way? Can I search for only direct comments to a submission, so I can skip step 3? Or am I tackling this in the wrong way?

Thanks! (Btw, I'm using the Python API)

33

You've reached the end of this feed.