diff --git a/rwx/sw/ytdlp/__init__.py b/rwx/sw/ytdlp/__init__.py index 326d5b1..378e436 100644 --- a/rwx/sw/ytdlp/__init__.py +++ b/rwx/sw/ytdlp/__init__.py @@ -85,6 +85,11 @@ class Video(Object): :type d: dict """ self.at = datetime.now().strftime("%Y%m%d%H%M%S") + # title + # description truncated + # duration + # thumbnails + # view_count self.uid = d["id"] self.fulltitle = d["fulltitle"] self.duration = d["duration"] @@ -93,22 +98,6 @@ class Video(Object): self.description = d["description"] -# channel -# title -# channel_follower_count -# description -# tags -# thumbnails -# uploader_id -# uploader -# videos / entries -# title -# description truncated -# duration -# thumbnails -# view_count - - # ╭──────────╮ # │ download │ # ╰──────────╯ @@ -197,33 +186,6 @@ def extract_videos(channel_id: str) -> dict: return extract(url_videos(channel_id)) -# ╭────────╮ -# │ filter │ -# ╰────────╯ - - -def filter_video(d: dict) -> dict: - """Return filtered video dict. - - :param d: video info dict - :type d: dict - :rtype: dict - """ - return { - "title": d["title"], - } - - -def filter_videos(d: dict) -> list[str]: - """Return filtered videos dict. - - :param d: videos dict - :type d: dict - :rtype: dict - """ - return [entry["id"] for entry in reversed(d["entries"])] - - # ╭──────╮ # │ next │ # ╰──────╯