1
0
mirror of https://github.com/chris124567/hulu synced 2024-11-01 06:17:30 +00:00

fix bug in random UUID generation for Hulu /playlist endpoint

This commit is contained in:
Christopher Tarry 2021-11-21 14:31:38 -05:00
parent ff25377cf1
commit 0bf67413d4
2 changed files with 2 additions and 1 deletions

View File

@ -167,7 +167,7 @@ func (c Client) Playlist(sessionKey int, eabID string) (p Playlist, err error) {
randUUID := func() string { randUUID := func() string {
randChars := func(n int) (s string) { randChars := func(n int) (s string) {
c := []byte("ABCDEF0123456789") c := []byte("ABCDEF0123456789")
for i := 0; i < 4; i++ { for i := 0; i < n; i++ {
s += string(c[frand.Intn(len(c))]) s += string(c[frand.Intn(len(c))])
} }
return return

View File

@ -5,6 +5,7 @@ import (
"time" "time"
) )
// These are constants taken from https://player.hulu.com/site/dash/308343-site-curiosity/js/app.js
var ( var (
deejayKey = []byte{110, 191, 200, 79, 60, 48, 66, 23, 178, 15, 217, 166, 108, 181, 149, 127} deejayKey = []byte{110, 191, 200, 79, 60, 48, 66, 23, 178, 15, 217, 166, 108, 181, 149, 127}
) )