def __register_comment(self, media_id, comment_id, post_code, comment_text=''): comment = Comment(media_id, comment_id, comment_text, post_code) self.comments.append(comment) if self.__write_to_db(comment): print("Succesfully added comment (id: {0} , url: {2} )\r\n\t{1}". format(comment.get_id(), comment.get_text(), comment.get_post_url())) else: print( "Failed to add comment (id: {0} , url: {2} )\r\n\t{1}".format( comment.get_id(), comment.get_text(), comment.get_post_url()))