Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 476 Bytes

readme.md

File metadata and controls

27 lines (20 loc) · 476 Bytes

Usage

go get github.com/Shaneumayanga/yt-info

package main

import (
    "fmt"

    ytdl "github.com/Shaneumayanga/yt-info"
)

func main() {
    info := ytdl.Info("https://www.youtube.com/watch?v=n10Ntw06xBA")
    fmt.Printf("video id %s \n", info.Id)
    fmt.Printf("title %s \n", info.Title)
    for _, format := range info.Formats {
        fmt.Printf("Format %s \n", format.Format_note)
        fmt.Printf("Download URL %s \n", format.Url)
    }
}