midr @ 73b1e5746a3f074aa103b5914a02769ff057c56e

 1package yt
 2
 3import (
 4	"fmt"
 5	"os/exec"
 6)
 7
 8func RunYtDlpProcess(link string, output string) {
 9	output_template := fmt.Sprintf("%s/%%(title)s.%%(ext)s", output)
10	downloaded_txt := fmt.Sprintf("%s/downloaded.txt", output)
11	cmd := exec.Command("yt-dlp", link, "-o", output_template, "--download-archive", downloaded_txt)
12	cmd.Run()
13}