board

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

BoardPostItem

class vlivepy.board.BoardPostItem(post_id: str, official_video: bool, session: vlivepy.session.UserSession)[source]

Bases: object

This is the object for board post list.

Parameters
  • post_id (str) – Unique id of post.

  • official_video (bool) – Session for loading data with permission, defaults to None.

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

session

Optional. Session for loading data with permission.

Type

vlivepy.UserSession

property has_official_video

Boolean value for having official video

Return type

bool

property post_id

Unique id of 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(board_id: Union[str, int], channel_code: str, session: Optional[vlivepy.session.UserSession] = None, after: Optional[str] = None, latest: bool = False, silent: bool = False)Optional[dict][source]

Get board post from page

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

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

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

Returns

dict. Parsed json data.

getBoardPostsIter()

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

Get board post as iterable (generator).

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

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

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

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

Yields

BoardPostItem