Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ytapi-sdk"
version = "0.2.0"
version = "0.2.1"
description = "Python client for YTAPI: YouTube transcripts, video details, search, channels and playlists."
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion src/ytapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
"YTAPI",
"YTAPIError",
]
__version__ = "0.2.0"
__version__ = "0.2.1"
35 changes: 35 additions & 0 deletions src/ytapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class VideoChannel(TypedDict, total=False):
title: str
url: str
subscribers: str
subscriber_count: int # ``subscribers`` as an approximate number
is_verified: bool
avatar_url: str


Expand All @@ -95,19 +97,52 @@ class Chapter(TypedDict, total=False):
time_description: str


class DescriptionLink(TypedDict, total=False):
text: str
url: str


class MusicTrack(TypedDict, total=False):
title: str
artist: str
album: str


class RelatedVideo(TypedDict, total=False):
video_id: str
title: str
channel_title: str
channel_id: str
length_text: str
view_count_text: str
published_text: str


class VideoInfo(TypedDict, total=False):
video_id: str
title: str
description: str
length_seconds: float
view_count: int
like_count: int
comment_count: int # rounded by YouTube; absent when comments are off
comment_count_text: str
published: int
keywords: list[str]
is_live: bool
is_upcoming: bool # a scheduled live stream or premiere
is_live_content: bool
scheduled_start: int # Unix start time, upcoming only
channel: VideoChannel
thumbnails: list[Thumbnail]
available_languages: list[CaptionLanguage]
chapters: list[Chapter]
ai_summary: str # YouTube's own summary, when it shows one
content_disclosure: str # YouTube's "How this was made" note
hashtags: list[str]
links: list[DescriptionLink]
music: list[MusicTrack]
related: list[RelatedVideo] # up to 20


class PlaylistVideo(TypedDict, total=False):
Expand Down
Loading