Fix PRAW deprecations

Fix depreciations in MultiredditHelper and CommentForest.
This commit is contained in:
OMEGARAZER
2022-11-21 21:37:59 -05:00
parent 4143c53ff1
commit 42416db8b9
5 changed files with 19 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ class BaseArchiveEntry(ABC):
'parent_id': in_comment.parent_id,
'replies': [],
}
in_comment.replies.replace_more(0)
in_comment.replies.replace_more(limit=None)
for reply in in_comment.replies:
out_dict['replies'].append(BaseArchiveEntry._convert_comment_to_dict(reply))
return out_dict

View File

@@ -45,7 +45,7 @@ class SubmissionArchiveEntry(BaseArchiveEntry):
def _get_comments(self) -> list[dict]:
logger.debug(f'Retrieving full comment tree for submission {self.source.id}')
comments = []
self.source.comments.replace_more(0)
self.source.comments.replace_more(limit=None)
for top_level_comment in self.source.comments:
comments.append(self._convert_comment_to_dict(top_level_comment))
return comments