File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,11 @@ class YouTubeChannel(BaseModel):
108108 alias = "contentDetails" ,
109109 )
110110
111+ @property
112+ def upload_playlist_id (self ) -> str :
113+ """Return playlist id with uploads from channel."""
114+ return str (self .channel_id ).replace ("UC" , "UU" , 1 )
115+
111116
112117class YouTubeSubscriptionSnippet (BaseModel ):
113118 """Model representing a YouTube subscription snippet."""
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ async def test_fetch_channel(
3232 )
3333 channel = await channel_generator .__anext__ ()
3434 assert channel
35+ assert channel .channel_id == "UC_x5XG1OV2P6uZZ5FSM9Ttw"
36+ assert channel .upload_playlist_id == "UU_x5XG1OV2P6uZZ5FSM9Ttw"
3537 assert channel .snippet
3638 assert channel .snippet .published_at == datetime (
3739 2007 ,
You can’t perform that action at this time.
0 commit comments