From 09e5573b24f63c0f670d4ce498237f384ca47199 Mon Sep 17 00:00:00 2001 From: autocommit Date: Mon, 1 Jun 2020 01:53:23 +0000 Subject: [PATCH] Monitor tree building progress Trying to find why only the one post comes out with no replies --- brutaldon/threadtree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/brutaldon/threadtree.py b/brutaldon/threadtree.py index 1f157a5..c2eedf7 100644 --- a/brutaldon/threadtree.py +++ b/brutaldon/threadtree.py @@ -7,11 +7,14 @@ def maketree(descendants): for descendant in descendants: if not descendant.in_reply_to_id: roots.add(descendant.id) - if descendant.in_reply_to_id in replies: + print("ROOT", descendant.id, descendant.account.acct) + elif descendant.in_reply_to_id in replies: reps = replies[descendant.in_reply_to_id] reps.add(descendant.id) + print("REPLY", descendant.id, descendant.in_reply_to_id) else: reps = set() + print("NEWREPLY", descendant.id, descendant.in_reply_to_id) replies[descendant.in_reply_to_id] = set([descendant.id]) seen = set() def onelevel(reps):