comment¶
This page describes comment module which can be imported as vlivepy.channel
comment_parser()¶
-
vlivepy.comment.
comment_parser
(comment_list: list, session: Optional[vlivepy.session.UserSession] = None) → list[source]¶ Parse each comment json data to
vlivepy.Comment
object.- Parameters
comment_list (
list
) – Comment list to parse.session (
vlivepy.UserSession
, optional) – Session for loading data with permission, defaults to None.
- Returns
List of
vlivepy.Comment
getCommentData()¶
-
vlivepy.comment.
getCommentData
(comment_id: str, session: Optional[vlivepy.session.UserSession] = None, silent: bool = False) → Optional[dict][source]¶ Get detailed comment data.
- Parameters
comment_id (
str
) – Unique id of the comment to load data.session (
vlivepy.UserSession
, optional) – Session for loading data with permission, defaults to None.silent (
bool
, optional) – Return None instead of raising exception, defaults to False.
- Returns
dict
. Parsed json data
getNestedComments()¶
-
vlivepy.comment.
getNestedComments
(comment_id: str, session: Optional[vlivepy.session.UserSession] = None, after: Optional[str] = None, silent: bool = False, raise_message: bool = False) → Optional[dict][source]¶ Get nested comments of the comment.
- Parameters
comment_id (
str
) – Unique id of the comment to load nested comment.session (
vlivepy.UserSession
, optional) – Session for loading data with permission, defaults to None.after (
str
, optional) – After parameter to load another page, defaults to None.silent (
bool
, optional) – Return None instead of raising exception, defaults to False.raise_message (
bool
, optional) – Raise exception instead of warning, defaults to False.
- Returns
dict
. Parsed json data.
getNestedCommentsIter()¶
-
vlivepy.comment.
getNestedCommentsIter
(comment_id: str, session: Optional[vlivepy.session.UserSession] = None)[source]¶ Get nested comments of the comment as iterable (generator).
- Parameters
comment_id (
str
) – Unique id of the comment to load nested comment.session (
vlivepy.UserSession
, optional) – Session for loading data with permission, defaults to None.
- Return type
Generator[vlivepy.Comment, None, None]
- Yields
getPostComments()¶
-
vlivepy.comment.
getPostComments
(post_id: str, session: Optional[vlivepy.session.UserSession] = None, after: Optional[str] = None, silent: bool = False, raise_message: bool = False) → Optional[dict][source]¶ Get comments of the post.
- Parameters
post_id (
str
) – Unique id of the post to load comment.session (
vlivepy.UserSession
, optional) – Session for loading data with permission, defaults to None.after (
str
, optional) – After parameter to load another page, defaults to None.silent (
bool
, optional) – Return None instead of raising exception, defaults to False.raise_message (
bool
, optional) – Raise exception instead of warning, defaults to False.
- Returns
dict
. Parsed json data.
getPostCommentsIter()¶
-
vlivepy.comment.
getPostCommentsIter
(post_id: str, session: Optional[vlivepy.session.UserSession] = None)[source]¶ Get comments of post as iterable (generator).
- Parameters
post_id (
str
) – Unique id of the post to load comment.session (
vlivepy.UserSession
, optional) – Session for loading data with permission, defaults to None.
- Return type
Generator[vlivepy.Comment, None, None]
- Yields
getPostStarComments()¶
-
vlivepy.comment.
getPostStarComments
(post_id: str, session: Optional[vlivepy.session.UserSession] = None, after: Optional[str] = None, silent: bool = False, raise_message: bool = False) → Optional[dict][source]¶ Get star comments of the post.
- Parameters
post_id (
str
) – Unique id of the post to load star comment.session (
vlivepy.UserSession
, optional) – Session for loading data with permission, defaults to None.after (
str
, optional) – After parameter to load another page, defaults to None.silent (
bool
, optional) – Return None instead of raising exception, defaults to False.raise_message (
bool
, optional) – Raise exception instead of warning, defaults to False.
- Returns
dict
. Parsed json data.
getPostStarCommentsIter()¶
-
vlivepy.comment.
getPostStarCommentsIter
(post_id: str, session: Optional[vlivepy.session.UserSession] = None)[source]¶ Get star comments of post as iterable (generator).
- Parameters
post_id (
str
) – Unique id of the post to load star comment.session (
vlivepy.UserSession
, optional) – Session for loading data with permission, defaults to None.raise_message (
bool
, optional) – Raise exception instead of warning, defaults to False.
- Return type
Generator[vlivepy.Comment, None, None]
- Yields