Functions

This page describes vlivepy’s functions.

vlivepy.postIdToVideoSeq()

vlivepy.postIdToVideoSeq(post_id: str, silent=False)Optional[str][source]

Convert post id to videoSeq id

Parameters
  • post_id (str) – Post id to convert to videoSeq id.

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

Returns

str. Paired videoSeq id of the post.

vlivepy.videoSeqToPostId()

vlivepy.videoSeqToPostId(video_seq: Union[str, int], silent=False)Optional[str][source]

Convert videoSeq id to post id

Parameters
  • video_seq (str, optional) – VideoSeq to convert to post id.

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

Returns

str. Paired post id of the videoSeq.

vlivepy.postTypeDetector()

vlivepy.postTypeDetector(post_id, silent=False)[source]

Check type of the post

Parameters
  • post_id (str, optional) – Unique id of the post to check.

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

Returns

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

vlivepy.decode_channel_code()

vlivepy.decode_channel_code(channel_code: str, silent: bool = False)Optional[int][source]

Decode channel code to unique channel seq

Parameters
  • channel_code (str, optional) – Unique id of the post to check.

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

Returns

int. Decoded channel code as channel seq.

vlivepy.loadSession()

vlivepy.loadSession(fp)vlivepy.session.UserSession[source]

Load UserSession

Parameters

fp (Any) – BufferedReader to read file

Returns

UserSession

vlivepy.dumpSession()

vlivepy.dumpSession(session: vlivepy.session.UserSession, fp)None[source]

Dump UserSession

Danger

Dumped UserSession file is unencrypted plain binary. Do not upload/commit dumped file to public place.

Parameters
  • session (UserSession) – UserSession object to dump

  • fp (Any) – BufferedWriter to write file