8000 GitHub - luispmenezes/youtube-comments: Go Lib to extract youtube comments without API
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

luispmenezes/youtube-comments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Youtube Comments

(Under-Construction)

Get comments from Youtube videos without using the API.

Usage

CLI

./youtube-comments -videoId dQw4w9WgXcQ -outputPath my-file.json

Lib

go get github.com/luispmenezes/youtube-comments
package main

import (
	"fmt"
	"github.com/luispmenezes/youtube-comments/pkg/youtubeComments"
)

func main() {
	client := youtubeComments.NewYoutubeCommentsClient()
	comments, err := client.GetComments("dQw4w9WgXcQ")
	if err != nil {
		panic(err)
	}
	fmt.Println(comments)
}

With a new comment continuation callback

package main

import (
	"fmt"
	"github.com/luispmenezes/youtube-comments/pkg/youtubeComments"
	"github.com/luispmenezes/youtube-comments/pkg/youtubeComments/model"
)

func main() {
	client := youtubeComments.NewYoutubeCommentsClient()
	client.RegisterCommentCallback(onNewComments)
	client.GetComments("1hgzRK-9J_A")
}

func onNewComments(comments []model.Comment)  {
	fmt.Println(comments)
}

About

Go Lib to extract youtube comments without API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0