archive module#

class VideoMetadata(id: str, title: str, duration: int, description: str)[source]#

Hold YouTube video metadata.

id: str#
title: str#
duration: int#
description: str#
class Run(run: RunParser, start: int, vod: VOD)[source]#

Contain run offset information from a vod.

to_json()[source]#
get_url()[source]#
class VOD(id: str)[source]#

Information from a stream vod with optional run information.

to_json()[source]#
get_offsets()[source]#

Return a mapping of offset to character played.

property datetime#
class _ArchiveHandler(filename: str, channel_id: str, api_key: str)[source]#

Handle archive maintenance.

errored: list[VOD]#

For the VODs with Spire that no run matches, somehow

property cached#

Whether we have cached data on the run VOD information.

load_from_disk()[source]#

Load video information from disk.

write_to_disk()[source]#

Write all the vod information to disk.

determine_offset()[source]#

Determine the run offset from the start of the vod.

async load_from_api() bool[source]#

Fetch VOD information from YouTube. Return True if it succeeded.