This commit is contained in:
Marc Beninca 2025-03-19 12:31:56 +01:00
parent aaeb9e6e47
commit b7e4add332
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -10,6 +10,7 @@ from rwx import Object
from rwx.fs import read_file_yaml from rwx.fs import read_file_yaml
from rwx.log import stream as log from rwx.log import stream as log
EXT = "webm"
TIMESTAMP = "%Y%m%d%H%M%S" TIMESTAMP = "%Y%m%d%H%M%S"
URL = "https://youtube.com" URL = "https://youtube.com"
@ -128,7 +129,7 @@ def download_video(video_id: str | None) -> None:
if video_id: if video_id:
ytdl( ytdl(
{ {
"format": "bestvideo[ext=webm]+bestaudio[ext=webm]", "format": "+".join([f"best{av}[ext={EXT}]" for av in ["video", "audio"]]),
"outtmpl": "%(id)s.%(ext)s", "outtmpl": "%(id)s.%(ext)s",
"postprocessors": [ "postprocessors": [
{ {