pl
This commit is contained in:
parent
5a40282ac3
commit
49dd4728f6
1 changed files with 18 additions and 3 deletions
|
@ -53,11 +53,26 @@ class Channel(Object):
|
||||||
]
|
]
|
||||||
# playlists
|
# playlists
|
||||||
d = extract_playlists(channel_id)
|
d = extract_playlists(channel_id)
|
||||||
self.playlists_ids = [playlist["id"] for playlist in reversed(d["entries"])]
|
self.playlists = [Playlist(entry) for entry in reversed(d["entries"])]
|
||||||
|
|
||||||
|
|
||||||
# TODO Format
|
# TODO Format
|
||||||
# TODO Playlist/basic,extra
|
|
||||||
|
|
||||||
|
# TODO Playlist/extra
|
||||||
|
class Playlist(Object):
|
||||||
|
"""YouTube playlist."""
|
||||||
|
|
||||||
|
def __init__(self, d: dict) -> None:
|
||||||
|
"""Set playlist info.
|
||||||
|
|
||||||
|
:param d: playlist info
|
||||||
|
:type d: dict
|
||||||
|
"""
|
||||||
|
self.uid = d["id"]
|
||||||
|
self.title = d["title"]
|
||||||
|
|
||||||
|
|
||||||
# TODO Thumbnail
|
# TODO Thumbnail
|
||||||
|
|
||||||
|
|
||||||
|
@ -140,7 +155,7 @@ def extract(url: str) -> dict[str, Any]:
|
||||||
"skip_download": True,
|
"skip_download": True,
|
||||||
},
|
},
|
||||||
).extract_info(url, download=False)
|
).extract_info(url, download=False)
|
||||||
log.info(d)
|
log.debug(d)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue