This commit is contained in:
Marc Beninca 2025-03-18 11:45:31 +01:00
parent 899b1383de
commit 75d54d3dbf
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 5 additions and 5 deletions

View file

@ -2,9 +2,8 @@
import os import os
import shutil import shutil
from pathlib import Path
import tomllib import tomllib
from pathlib import Path
from rwx import ps from rwx import ps

View file

@ -17,6 +17,7 @@
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from pathlib import Path from pathlib import Path
from typing import Any from typing import Any
from yt_dlp import YoutubeDL from yt_dlp import YoutubeDL
from rwx import Object from rwx import Object
@ -125,7 +126,7 @@ class Video(Tab):
"outtmpl": "%(id)s.%(ext)s", "outtmpl": "%(id)s.%(ext)s",
"writesubtitles": True, "writesubtitles": True,
"writethumbnail": True, "writethumbnail": True,
} },
).download([self.url]) ).download([self.url])
def get_url(self) -> str: def get_url(self) -> str:
@ -194,7 +195,7 @@ def download_video(video_id: str | None) -> None:
], ],
"writesubtitles": True, "writesubtitles": True,
"writethumbnail": True, "writethumbnail": True,
} },
).download([f"{URL}/watch?v={video_id}"]) ).download([f"{URL}/watch?v={video_id}"])
@ -213,7 +214,7 @@ def extract(opt: dict[str, Any], url: str) -> dict[str, Any]:
**opt, **opt,
"extract_flat": True, "extract_flat": True,
"skip_download": True, "skip_download": True,
} },
).extract_info(url, download=False) ).extract_info(url, download=False)