useless
This commit is contained in:
parent
cc4eb0e686
commit
3e04daeb8b
1 changed files with 5 additions and 43 deletions
|
@ -85,6 +85,11 @@ class Video(Object):
|
||||||
:type d: dict
|
:type d: dict
|
||||||
"""
|
"""
|
||||||
self.at = datetime.now().strftime("%Y%m%d%H%M%S")
|
self.at = datetime.now().strftime("%Y%m%d%H%M%S")
|
||||||
|
# title
|
||||||
|
# description truncated
|
||||||
|
# duration
|
||||||
|
# thumbnails
|
||||||
|
# view_count
|
||||||
self.uid = d["id"]
|
self.uid = d["id"]
|
||||||
self.fulltitle = d["fulltitle"]
|
self.fulltitle = d["fulltitle"]
|
||||||
self.duration = d["duration"]
|
self.duration = d["duration"]
|
||||||
|
@ -93,22 +98,6 @@ class Video(Object):
|
||||||
self.description = d["description"]
|
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 │
|
# │ download │
|
||||||
# ╰──────────╯
|
# ╰──────────╯
|
||||||
|
@ -197,33 +186,6 @@ def extract_videos(channel_id: str) -> dict:
|
||||||
return extract(url_videos(channel_id))
|
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 │
|
# │ next │
|
||||||
# ╰──────╯
|
# ╰──────╯
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue