Skip to content

Commit

Permalink
add user agent, fix #13
Browse files Browse the repository at this point in the history
  • Loading branch information
chigusa committed Jan 27, 2019
1 parent b103429 commit 2fec23b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/recorders/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import (
"github.com/hr3lxphr6j/bililive-go/src/lib/utils"
)

const (
userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36"
)

type Recorder struct {
Live api.Live
OutPutPath string
Expand Down Expand Up @@ -74,6 +78,7 @@ func (r *Recorder) run() {
"ffmpeg",
"-loglevel", "warning",
"-y", "-re",
"-user_agent", userAgent,
"-timeout", "60000000",
"-i", urls[0].String(),
"-c", "copy",
Expand Down

0 comments on commit 2fec23b

Please sign in to comment.