Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qjfoidnh committed Jun 23, 2024
1 parent 0e24faa commit b1cf39a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions baidupcs/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ func (pcs *BaiduPCS) GenerateShareQueryURL(subPath string, params map[string]str
Path: "/share/" + subPath,
}
uv := shareURL.Query()
uv.Set("app_id", PanAppID)
uv.Set("channel", "chunlei")
uv.Set("t", strconv.Itoa(int(time.Now().UnixMilli())))
uv.Set("web", "1")
uv.Set("clienttype", "0")
//uv.Set("app_id", PanAppID)
//uv.Set("channel", "chunlei")
uv.Set("time", strconv.Itoa(int(time.Now().UnixMilli())))
//uv.Set("web", "1")
uv.Set("clienttype", "1")
for key, value := range params {
uv.Set(key, value)
}
Expand Down Expand Up @@ -90,7 +90,7 @@ func (pcs *BaiduPCS) PostShareQuery(url string, referer string, data map[string]
dataReadCloser, panError := pcs.sendReqReturnReadCloser(reqTypePan, OperationShareFileSavetoLocal, http.MethodPost, url, data, map[string]string{
"User-Agent": requester.UserAgent,
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Referer": referer,
"Referer": referer,
})
res = make(map[string]string)
if panError != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/pcscommand/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ func RunShareTransfer(params []string, opt *baidupcs.TransferOption) {
featuremap := make(map[string]string)
//featuremap["surl"] = featurestr[1:len(featurestr)]
featuremap["shareid"] = tokens["shareid"]
featuremap["uk"] = tokens["uk"]
featuremap["uk"] = tokens["share_uk"]
if extracode != "none" {

vefiryurl = pcs.GenerateShareQueryURL("verify", featuremap).String()
res := pcs.PostShareQuery(vefiryurl, link, map[string]string{
"pwd": extracode,
"vcode": "null",
"vcode_str": "null",
"bddstoken": tokens["bdstoken"],
"bdstoken": tokens["bdstoken"],
})
if res["ErrMsg"] != "0" {
fmt.Printf("%s失败: %s\n", baidupcs.OperationShareFileSavetoLocal, res["ErrMsg"])
Expand Down

0 comments on commit b1cf39a

Please sign in to comment.