Skip to content

opentube.channel ​

Classes ​

Channel ​

opentube.channel.Channel

Property Index ​

Method Index ​

Properties ​

available_country_codes ​

Returns the list of country codes where the channel is available.

Returns ​

  • Type: List[str]
    • The list of country codes where the channel is available

avatars ​

Returns the avatars of the channel in different resolutions.

Returns ​

  • Type: List[Dict[str, Any]]
    • The avatars of the channel.

banners ​

Returns the banners of the channel in different resolutions.

Returns ​

  • Type: List[Dict[str, Any]]
    • The banners of the channel.

country ​

Returns the country of the channel if available.

Returns ​

  • Type: str | None
    • The country of the channel if available.

creation_date ​

Returns the date of creation of the channel.

Returns ​

  • Type: str
    • The date of creation of the channel.

custom_url ​

Returns the user created custom url of the channel.

Returns ​

  • Type: str
    • The user created custom url of the channel.

description ​

Returns the description of the channel.

Returns ​

  • Type: str
    • The description of the channel.

family_safe ​

Returns whether the channel is marked as family safe.

Returns ​

  • Type: bool
    • True if the channel is marked as family safe, False otherwise.

id ​

Returns the unique id of the channel.

Returns ​

  • Type: str
    • The unique id of the channel.

keywords ​

Returns the keywords of the channel.

Returns ​

  • Type: List[str]
    • The keywords of the channel.

last_streamed ​

Fetches the id of the last completed livestream.

Returns ​

  • Type: str | None
    • The id of the last livestreamed video or None.

last_uploaded ​

Fetches the id of the last uploaded video.

Returns ​

  • Type: Dict[str, Any] | None
    • The id of the last uploaded video or None.

live ​

Returns whether the channel is currently livestreaming.

Returns ​

  • Type: bool
    • True if the channel is currently livestreaming, False otherwise.

metadata ​

Returns channel metadata in a python dictionary format.

Returns ​

  • Type: Dict
    • Channel metadata containing the keys like id, name, subscribers, views, country, custom_url, avatar, banner, url, description, socials etc.

name ​

Returns the name of the channel.

Returns ​

  • Type: str
    • The name of the channel.

old_streams ​

Fetches the ids of all old or completed livestreams.

Returns ​

  • Type: List[str] | None
    • The ids of all old or completed streams or None.

rss_url ​

Returns the rss url of the channel.

Returns ​

  • Type: str
    • The rss url of the channel.

socials ​

Returns the socials of the channel.

Returns ​

  • Type: List[str]
    • The socials of the channel.

streaming_now ​

Fetches the ids of all ongoing livestreams.

Returns ​

  • Type: List[str] | None
    • The ids of all ongoing streams or None.

subscribers ​

Returns the subscriber count of the channel.

Returns ​

  • Type: str
    • The subscriber count of the channel.

upcoming ​

Fetches the upcoming scheduled videos.

Returns ​

  • Type: List[str] | None
    • The ids of upcoming scheduled videos or None.

url ​

Returns the url of the channel.

Returns ​

  • Type: str
    • The url of the channel.

verified ​

Returns whether the channel is verified by YouTube.

Returns ​

  • Type: bool
    • True if the channel is verified, False otherwise

video_count ​

Returns the total number of videos uploaded in the channel.

Returns ​

  • Type: int
    • The total number of videos uploaded in the channel.

views ​

Returns the total number of views the channel got across all videos.

Returns ​

  • Type: str
    • The total number of views the channel got across all videos.

Methods ​

playlists ​

python
playlists(self) -> List[Dict[str, Any]] | None

Fetches the basic metadata of some public playlists.

Returns ​

  • Type: List[Dict[str, Any]] | None
    • The basic metadata of all playlists or None.

shorts ​

python
shorts(self) -> Dict[str, Any] | None

Fetches uploaded shorts and their basic metadata.

Returns ​

  • Type: Dict[str, Any] | None
    • A dict containing basic metadata of uploaded shorts or None.

videos ​

python
videos(self) -> Dict[str, Any] | None

Fetches upto 30 uploaded videos and their basic metadata.

Returns ​

  • Type: Dict[str, Any] | None
    • A dict containing basic metadata of uploaded videos or None.