This commit is contained in:
Marc Beninca 2025-03-19 17:58:29 +01:00
parent c3fad738b3
commit 59ee8ed161
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -162,7 +162,9 @@ class Video(Object):
# TODO subtitles # TODO subtitles
self.chapters = d["chapters"] self.chapters = d["chapters"]
self.likes = d["like_count"] self.likes = d["like_count"]
self.timestamp = datetime.fromtimestamp(d["timestamp"]).strftime(TIMESTAMP) self.timestamp = datetime.fromtimestamp(d["timestamp"]).strftime(
TIMESTAMP
)
self.fulltitle = d["fulltitle"] self.fulltitle = d["fulltitle"]
@ -175,7 +177,9 @@ def download_video(video_id: str | None) -> None:
if video_id: if video_id:
ytdl( ytdl(
{ {
"format": "+".join([f"best{av}[ext={EXT}]" for av in ["video", "audio"]]), "format": "+".join(
[f"best{av}[ext={EXT}]" for av in ["video", "audio"]]
),
"outtmpl": "%(id)s.%(ext)s", "outtmpl": "%(id)s.%(ext)s",
"postprocessors": [ "postprocessors": [
{ {