Dont always fall through on every error.
Add user agent to calls
This commit is contained in:
parent
c7c220ecd3
commit
cd11e82676
1 changed files with 1 additions and 0 deletions
|
@ -254,6 +254,7 @@ func run(use string, args []string, withStdErr, withStdOut bool, stopChan stop.C
|
||||||
}
|
}
|
||||||
defer pool.ReleaseIP(sourceAddress)
|
defer pool.ReleaseIP(sourceAddress)
|
||||||
argsForCommand := append(args, "--source-address", sourceAddress)
|
argsForCommand := append(args, "--source-address", sourceAddress)
|
||||||
|
argsForCommand = append(args, "--user-agent", "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")
|
||||||
cmd := exec.Command("youtube-dl", argsForCommand...)
|
cmd := exec.Command("youtube-dl", argsForCommand...)
|
||||||
logrus.Printf("Running command youtube-dl %s", strings.Join(argsForCommand, " "))
|
logrus.Printf("Running command youtube-dl %s", strings.Join(argsForCommand, " "))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue