mirror of
https://github.com/AynaLivePlayer/miaosic.git
synced 2026-03-19 02:19:46 +08:00
update user-agent
This commit is contained in:
@@ -26,10 +26,10 @@ type BilibiliVideo struct {
|
||||
|
||||
func NewBilibiliViedo() *BilibiliVideo {
|
||||
headers := map[string]string{
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0",
|
||||
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36",
|
||||
"Referer": "https://www.bilibili.com/",
|
||||
"Origin": "https://www.bilibili.com",
|
||||
"Cookie": "buvid3=9A8B3564-BDA9-407F-B45F-D5C40786CA49167618infoc;",
|
||||
"Cookie": "buvid3=40BA0253-7F5C-06C1-12CE-871EC008DB2096426infoc;",
|
||||
}
|
||||
pvdr := &BilibiliVideo{
|
||||
BVRegex: regexp.MustCompile("^BV[0-9A-Za-z]+"),
|
||||
@@ -84,6 +84,7 @@ func NewBilibiliViedo() *BilibiliVideo {
|
||||
},
|
||||
deepcolor.ParserGJson,
|
||||
func(resp *gjson.Result, result *[]miaosic.MediaInfo) error {
|
||||
fmt.Println(resp.String())
|
||||
if resp.Get("code").String() != "0" {
|
||||
return errors.New("failed to find required data")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user