diff --git a/extractor/twitch/PlaybackAccessToken.go b/extractor/twitch/PlaybackAccessToken.go index 044f7a5..4a95afd 100644 --- a/extractor/twitch/PlaybackAccessToken.go +++ b/extractor/twitch/PlaybackAccessToken.go @@ -1,8 +1,6 @@ package twitch import ( - "fmt" - "github.com/tidwall/gjson" ) @@ -49,8 +47,6 @@ func getPlaybackAccessToken(streamerName string, vodID string) (PlaybackAccessTo return PlaybackAccessToken{}, err } - fmt.Println(string(body)) - var token string var signature string if isLive { diff --git a/extractor/twitch/Stream.go b/extractor/twitch/Stream.go index a47b6e3..4bd3cc1 100644 --- a/extractor/twitch/Stream.go +++ b/extractor/twitch/Stream.go @@ -14,13 +14,10 @@ func GetStream(streamerName string) (string, error) { signature := tokenwsig.Signature playlistUrl := "https://usher.ttvnw.net/api/channel/hls/" + strings.ToLower(streamerName) + ".m3u8" - params := "?sig=" + signature + "&token=" + token + params := fmt.Sprintf("?sig=%s&token=%s&acmb=e30=&allow_source=true&fast_bread=true&p=4189675&player_backend=mediaplayer&playlist_include_framerate=true&reassignments_supported=true&transcode_mode=cbr_v1&cdm=wv&player_version=1.20.0", signature, token) req, err := http.NewRequest("GET", playlistUrl+params, nil) req.Header.Add("Client-Id", "ue6666qo983tsx6so1t0vnawi233wa") - - fmt.Println(req.URL.String()) - if err != nil { return "", err } diff --git a/extractor/twitch/VOD.go b/extractor/twitch/VOD.go index 76cc0bf..1b0c1b6 100644 --- a/extractor/twitch/VOD.go +++ b/extractor/twitch/VOD.go @@ -53,8 +53,8 @@ func GetVODPlaylist(vodID string) ([]byte, error) { return []byte{}, err } - params := "?token=" + tokens.Token + "&sig=" + tokens.Signature - req, err := http.NewRequest("GET", "https://usher.ttvnw.net/vod/"+fmt.Sprint(vodID)+".m3u8"+params, nil) + params := fmt.Sprintf("?sig=%s&token=%s&acmb=e30=&allow_source=true&fast_bread=true&p=4189675&player_backend=mediaplayer&playlist_include_framerate=true&reassignments_supported=true&transcode_mode=cbr_v1&cdm=wv&player_version=1.20.0", tokens.Signature, tokens.Token) + req, err := http.NewRequest("GET", fmt.Sprintf("https://usher.ttvnw.net/vod/%s.m3u8%s", fmt.Sprint(vodID), params), nil) if err != nil { return []byte{}, err }