Skip to content

Commit

Permalink
allowing users to listen to huya banned rooms (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
kira1928 committed Jan 20, 2023
1 parent c8e05d2 commit 4e708fc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/live/huya/huya.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ func (l *Live) GetInfo() (info *live.Info, err error) {
return nil, live.ErrRoomNotExist
}

if strings.Contains(body, "该主播涉嫌违规,正在整改中") {
return &live.Info{
Live: l,
HostName: "该主播涉嫌违规,正在整改中",
RoomName: "该主播涉嫌违规,正在整改中",
Status: false,
}, nil
}

var (
strFilter = utils.NewStringFilterChain(utils.ParseUnicode, utils.UnescapeHTMLEntity)
hostName = strFilter.Do(utils.Match1(`"nick":"([^"]*)"`, body))
Expand Down

0 comments on commit 4e708fc

Please sign in to comment.