Skip to content

Instantly share code, notes, and snippets.

@weakish
Last active November 26, 2016 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weakish/45075e50b3cbbcac33140fede8fd6ca5 to your computer and use it in GitHub Desktop.
Save weakish/45075e50b3cbbcac33140fede8fd6ca5 to your computer and use it in GitHub Desktop.
Run `you-get` with multiple urls, written in #Go.

Usage:

cat one-url-per-line.list | you-get-all

License: 0BSD

package main
import (
"bufio"
"fmt"
"os"
"os/exec"
)
func main() {
scanner := bufio.NewScanner(os.Stdin)
for scanner.Scan() {
url := scanner.Text()
cmd := exec.Command("you-get", url)
if cmd.Run() != nil {
fmt.Println(url)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment