From 45eac39d304560e9c93a618739fc0f29f4ab7fe5 Mon Sep 17 00:00:00 2001 From: BreadTube Date: Thu, 30 Oct 2025 00:00:09 +0900 Subject: [PATCH] Change channel country to be optional --- breadtube_bot/youtube_objects.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/breadtube_bot/youtube_objects.py b/breadtube_bot/youtube_objects.py index a70c593..840e8da 100644 --- a/breadtube_bot/youtube_objects.py +++ b/breadtube_bot/youtube_objects.py @@ -87,7 +87,7 @@ class ChannelSnippet(_Api): customUrl: str publishedAt: datetime thumbnails: Thumbnails - country: str + country: str | None @staticmethod def from_dict(info: dict) -> ChannelSnippet: @@ -97,7 +97,7 @@ class ChannelSnippet(_Api): customUrl=info['customUrl'], publishedAt=datetime.fromisoformat(info['publishedAt']), thumbnails=Thumbnails.from_dict(info['thumbnails']), - country=info['country']) + country=info.get('country')) @dataclass