midr @ db7e822dda56d32135eca6d3e3211a50cf93d31a

 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}