Experimental implementation of niconico API client for Golang.
- Login/Logout
- Search
- MyList
- Ranking
- Comments (read only)
- Download video
T.B.D.
func main() {
client := nigonigo.NewClient()
contentID := "sm9"
session, err := client.CreateVideoSession(contentID)
if err != nil {
log.Fatalf("Failed to create session: %v", err)
}
out, _ := os.Create(contentID + "." + session.FileExtension())
defer out.Close()
err = client.Download(context.Background(), session, out)
if err != nil {
log.Fatalf("Failed to download: %v", err)
}
log.Println("ok")
}
install:
go install github.com/binzume/nigonigo/cmd/nigo@latest
usage:
nigo search "ねこ"
nigo search -t "MMD 初音ミク"
nigo search -sort "-viewCounter" -limit 3 -t "ニコニコ技術部"
nigo search -series 96269
nigo search -id sm9
nigo ranking cooking
nigo auth -i "YOUR_MAILADDRESS"
Password: ********
nigo download sm9
open sm9.mp4
MIT License