Change channel country to be optional
This commit is contained in:
parent
3ddffe2774
commit
45eac39d30
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue