Skip to content

Commit

Permalink
remove session_id from douyin download url (hr3lxphr6j#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
kira1928 authored Sep 26, 2023
1 parent 0807917 commit 133c402
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/live/douyin/douyin.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@ func (l *Live) getRoomInfoFromBody(body string) (info *live.Info, streamUrlInfos
err = fmt.Errorf(errorMessageForErrorf+". %s does not exist: %s", stepNumberForLog, streamIdPath, mainInfoLine)
return
}
sessionIdPath := "state.streamStore.streamData.H264_streamData.common.session_id"
sessionId := mainJson.Get(sessionIdPath).String()
if streamId == "" {
err = fmt.Errorf(errorMessageForErrorf+". %s does not exist: %s", stepNumberForLog, sessionIdPath, mainInfoLine)
return
}
stepNumberForLog++

streamUrlInfos = make([]live.StreamUrlInfo, 0, 4)
Expand Down Expand Up @@ -177,7 +171,7 @@ func (l *Live) getRoomInfoFromBody(body string) (info *live.Info, streamUrlInfos
}

commonJson.Get("data").ForEach(func(key, value gjson.Result) bool {
flv := value.Get("main.flv").String() + "&session_id=" + sessionId
flv := value.Get("main.flv").String()
var Url *url.URL
Url, err = url.Parse(flv)
if err != nil {
Expand Down

0 comments on commit 133c402

Please sign in to comment.