Skip to content
2525
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
configs
examples
.gitignore
LICENSE
README.md
account.go
dmc.go
hls_downloader.go
http_downloader.go
niconico.go
niconico_test.go
search.go
utils.go
video.go

README.md

[WIP] niconico API client for Golang

Experimental implementation of niconico API client for Golang.

Features

  • Login
  • Search
  • Download video

Usage

T.B.D.

func main() {
	client := nigonigo.NewClient()

	contentID := "sm9"
	video, err := client.GetVideoData(contentID)
	if err != nil {
		t.Fatalf("Failed to create session: %v", err)
	}

	out, _ := os.Create(contentID + "." + video.SmileFileExtension())
	defer out.Close()
	err = client.DownloadFromSmile(ctx, video, out)
	if err != nil {
		t.Errorf("Failed to download: %v", err)
	}
	log.Println("ok")
}
func main() {
	client := nigonigo.NewClient()

	contentID := "sm9"
	session, err := client.CreateDMCSessionById(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")
}

License

MIT License

You can’t perform that action at this time.