gotiktoklive icon indicating copy to clipboard operation
gotiktoklive copied to clipboard

stopped after print "Started polling"

Open hiwjd opened this issue 2 years ago • 3 comments

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)
		}
	}
}

hiwjd avatar Jul 23 '22 16:07 hiwjd

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

Davincible avatar Jul 26 '22 14:07 Davincible

Nodejs version is still working btw.

doganarif avatar Aug 01 '22 19:08 doganarif

Nodejs version has been fixed already. Still need to implement it :)

Davincible avatar Aug 02 '22 11:08 Davincible

Sorry for the delay, but has been fixed!

Davincible avatar Aug 12 '22 22:08 Davincible