Comment 评论类

class zhihu.comment.Comment(cid, answer, author, upvote_num, content, time, group_id=None)[源代码]

评论类,一般不直接使用,而是作为``Answer.comments``迭代器的返回类型.

__init__(cid, answer, author, upvote_num, content, time, group_id=None)[源代码]

创建评论类实例.

参数:
  • cid (int) – 评论ID
  • group_id (int) – 评论所在的组ID
  • answer (Answer) – 评论所在的答案对象
  • author (Author) – 评论的作者对象
  • upvote_num (int) – 评论赞同数量
  • content (str) – 评论内容
  • creation_time (datetime.datetime) – 评论发表时间
返回:

评论对象

返回类型:

Comment