gotiktoklive
gotiktoklive copied to clipboard
stopped after print "Started polling"
this project is so great and thank you for your working.
I followed the Getting Started
in README but removed live.DownloadStream()
lines, the code stopped after print "Started polling", any suggestions?
here is the code (i omitted the proxy addr and user ID)
package main
import (
"fmt"
"github.com/Davincible/gotiktoklive"
)
func main() {
tiktok := gotiktoklive.NewTikTok()
tiktok.SetProxy("http://.........", true)
// Track a TikTok user by username
live, err := tiktok.TrackUser("......")
if err != nil {
panic(err)
}
// Receive livestream events through the live.Events channel
for event := range live.Events {
switch e := event.(type) {
// You can specify what to do for specific events. All events are listed below.
case gotiktoklive.UserEvent:
fmt.Printf("%T : %s %s\n", e, e.Event, e.User.Username)
// List viewer count
case gotiktoklive.ViewersEvent:
fmt.Printf("%T : %d\n", e, e.Viewers)
// Specify the action for all remaining events
default:
fmt.Printf("%T : %+v\n", e, e)
}
}
}
Yeah I just heard that tiktok changed a bunch, and now you need to login before being able to follow streams unfortunately. Haven't had time yet to look into it, so for the time being I'm afraid its broken
Nodejs version is still working btw.
Nodejs version has been fixed already. Still need to implement it :)
Sorry for the delay, but has been fixed!