channel
This commit is contained in:
parent
35ab34c67d
commit
5a40282ac3
1 changed files with 2 additions and 8 deletions
|
@ -55,13 +55,6 @@ class Channel(Object):
|
||||||
d = extract_playlists(channel_id)
|
d = extract_playlists(channel_id)
|
||||||
self.playlists_ids = [playlist["id"] for playlist in reversed(d["entries"])]
|
self.playlists_ids = [playlist["id"] for playlist in reversed(d["entries"])]
|
||||||
|
|
||||||
def load_videos(self) -> None:
|
|
||||||
"""Load videos extra info."""
|
|
||||||
self.videos = []
|
|
||||||
for index, video_id in enumerate(self.videos_ids):
|
|
||||||
log.info(f"{index} ∕ {len(self.videos_ids)}")
|
|
||||||
self.videos.append(Video(video_id))
|
|
||||||
|
|
||||||
|
|
||||||
# TODO Format
|
# TODO Format
|
||||||
# TODO Playlist/basic,extra
|
# TODO Playlist/basic,extra
|
||||||
|
@ -87,10 +80,11 @@ class Video(Object):
|
||||||
self.at = datetime.now().strftime(TIMESTAMP)
|
self.at = datetime.now().strftime(TIMESTAMP)
|
||||||
d = extract_video(self.uid)
|
d = extract_video(self.uid)
|
||||||
# TODO formats
|
# TODO formats
|
||||||
|
self.formats = d["formats"]
|
||||||
thumbnail = d["thumbnails"][-1]["url"]
|
thumbnail = d["thumbnails"][-1]["url"]
|
||||||
# TODO compare existing thumbnail
|
# TODO compare existing thumbnail
|
||||||
self.description = d["description"]
|
self.description = d["description"]
|
||||||
# TODO channel_id
|
self.channel_id = d["channel_id"]
|
||||||
self.duration = int(d["duration"])
|
self.duration = int(d["duration"])
|
||||||
self.views = int(d["view_count"])
|
self.views = int(d["view_count"])
|
||||||
self.categories = d["categories"]
|
self.categories = d["categories"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue