Skip to content

Commit

Permalink
Update util.go
Browse files Browse the repository at this point in the history
  • Loading branch information
zengge99 authored Jun 17, 2024
1 parent 48425fd commit fa78e50
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/quark_share/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,22 @@ func (d *QuarkShare) link(file model.Obj, fid string) (*model.Link, error) {
"resolutions": "normal,low,high,super,2k,4k",
"supports": "fmp4",
}
var resp DownResp
var resp PreviewResp
ua := d.conf.ua
r, err := d.request("/file/v2/play", http.MethodPost, func(req *resty.Request) {
req.SetHeader("User-Agent", ua).
SetBody(data)
}, nil)
}, &resp)
fmt.Println("获取转码响应", file.GetName(), string(r))
if err != nil {
fmt.Println("获取夸克直链失败", file.GetName(), err)
return nil, err
}

fmt.Println("获取夸克直链成功:", file.GetName(), resp.Data[0].DownloadUrl)
fmt.Println("获取夸克直链成功:", file.GetName(), resp.Data.VideoListData[0].Url)

return &model.Link{
URL: resp.Data[0].DownloadUrl,
URL: resp.Data.VideoListData[0].Url,
Header: http.Header{
"Cookie": []string{d.Cookie},
"Referer": []string{d.conf.referer},
Expand Down

0 comments on commit fa78e50

Please sign in to comment.