示例#1
0
 def __init__(self,
              id: str,
              title: str,
              author: str,
              text: str,
              url: str = None,
              date: datetime = datetime.now(),
              comments: List[str] = None):
     super().__init__("reddit:" + id, title, [author], text, url, date)
     self.comments = [Helpers.cleanup_str(x) for x in comments]
     self._all_text += '. '.join(comments)
     self._type = "RedditDocument"