I wrote a little script because my girlfriend recently switched to linux and I wanted to make it easy for her to use youtube-dl. Anyways trying to make a little go script I met a roadblock that is probably just my stupidity, because the code does nothing. I suspect that the problem is me trying to add the name variable to the command and doing it wrong
package main
import ( "os"
"os/exec"
"log"
"http://github.com/tcnksm/go-input"
)
func main() {
ui := &input.UI{
Writer: os.Stdout,
Reader: os.Stdin,
}
query := "Please paste the link of the playlist"
name, err := ui.Ask(query, &input.Options{
Required: true,
}) if err != nil {
log.Fatal(err)}
exec.Command("youtube-dl -v -x -i --yes-playlist " + name )
}
I tried it with the arguments you used, and got a video with just audio, no picture. So if that happens, try different arguments for the youtube-dl command.