board

This page describes board module which can be imported as vlivepy.board

BoardPostItem

class vlivepy.board.BoardPostItem(post_item: dict, session: vlivepy.session.UserSession)[source]

Bases: object

This is the object for board post list.

Parameters
  • post_item (bool) – Post item dict from getBoardPost().

  • session (vlivepy.UserSession, optional) – Session for loading data with permission.

session

Optional. Session for loading data with permission.

Type

vlivepy.UserSession

property author_nickname

Nickname of author.

Return type

str

property content_type

Type of post.

Returns

“POST” if the post is normal Post. “VIDEO” if the post is OfficialVideoPost

Return type

str

property created_at

Epoch timestamp about created time. The nanosecond units are displayed below the decimal point.

Return type

float

property has_official_video

Boolean value for having official video

Return type

bool

property post_id

Unique id of post.

Return type

str

property title

Title of the post

Return type

str

to_object()Union[vlivepy.model.Post, vlivepy.model.OfficialVideoPost][source]

Initialize matched object from post_id

Returns

vlivepy.Post, if the post is normal post. vlivepy.OfficialVideoPost, if the post is official video

getBoardPosts()

vlivepy.board.getBoardPosts(channel_code: str, board_id: Union[str, int], session: Optional[vlivepy.session.UserSession] = None, after: Optional[str] = None, latest: bool = False, silent: bool = False, raise_message: bool = False)Optional[dict][source]

Get board post from page

Parameters
  • channel_code (str) – Unique id of the channel which contains board.

  • board_id (str) – Unique id of the board to load.

  • 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.

  • latest (bool, optional) – Load latest post first, defaults to False.

  • silent (bool, optional) – Return None instead of raising exception, defaults to False.

  • raise_message (bool, optional) – Raise exception instead of parser warning, defaults to False.

Returns

dict. Parsed json data.

getBoardPostsIter()

vlivepy.board.getBoardPostsIter(channel_code: str, board_id: Union[str, int], session: Optional[vlivepy.session.UserSession] = None, latest: bool = False)Generator[vlivepy.board.BoardPostItem, None, None][source]

Get board post as iterable (generator).

Parameters
  • channel_code (str) – Unique id of the channel which contains board.

  • board_id (str) – Unique id of the board to load.

  • session (vlivepy.UserSession, optional) – Session for loading data with permission, defaults to None.

  • latest (str, optional) – Load latest post first.

Yields

BoardPostItem