Skip to content

Commit

Permalink
Fix content json export
Browse files Browse the repository at this point in the history
  • Loading branch information
MalloyDelacroix committed Jan 4, 2022
1 parent 5040c8f commit 90d4f77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DownloaderForReddit/utils/exporters/json_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,13 @@ def export_posts_to_json(post_list, file_path, nested=False):


def export_content_to_json(content_list, file_path, nested=False):
content_list = list(content_list)
encoder = NestedJSONContentEncoder if nested else SimpleJSONContentEncoder
_export(ContentCollection(content_list), file_path, encoder)


def export_comments_to_json(comment_list, file_path, nested=False):
comment_list = list(comment_list)
encoder = NestedJSONCommentEncoder if nested else SimpleJSONCommentEncoder
_export(CommentCollection(comment_list), file_path, encoder)

Expand Down

0 comments on commit 90d4f77

Please sign in to comment.