
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
github.com/damaredayo/goutubedl
Advanced tools
Go wrapper for youtube-dl and yt-dlp, currently tested and developed using yt-dlp. API documentation can be found at godoc.org.
See yt-dlp documentation for how to install and what is recommended to install in addition to youtube-dl.
goutubedl default uses PATH to find youtube-dl but it can be configured with the goutubedl.Path
variable. Default is currently youtube-dl for backwards compability. If your using yt-dlp you
probably want to set it to yt-dlp.
Due to the nature and frequent updates of youtube-dl only the latest version is tested. But it seems to work well with older versions also.
From cmd/example/main.go
package main
import (
"context"
"io"
"log"
"os"
"github.com/wader/goutubedl"
)
func main() {
result, err := goutubedl.New(context.Background(), "https://www.youtube.com/watch?v=jgVhBThJdXc", goutubedl.Options{})
if err != nil {
log.Fatal(err)
}
downloadResult, err := result.Download(context.Background(), "best")
if err != nil {
log.Fatal(err)
}
defer downloadResult.Close()
f, err := os.Create("output")
if err != nil {
log.Fatal(err)
}
defer f.Close()
io.Copy(f, downloadResult)
}
See goutubedl cmd tool or ydls for usage examples.
docker build -t goutubedl-dev .
docker run --rm -ti -v "$PWD:$PWD" -w "$PWD" goutubedl-dev
go test -v -race -cover
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.