From 07b19a066ff80d4d899e429d1f1f77c0131f5e85 Mon Sep 17 00:00:00 2001 From: qjfoidnh Date: Thu, 12 Dec 2024 00:13:47 +0800 Subject: [PATCH] fix transfer --- baidupcs/transfer.go | 3 --- internal/pcscommand/transfer.go | 11 ++++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/baidupcs/transfer.go b/baidupcs/transfer.go index 7986f68..f50690b 100644 --- a/baidupcs/transfer.go +++ b/baidupcs/transfer.go @@ -2,7 +2,6 @@ package baidupcs import ( "fmt" - "github.com/qjfoidnh/BaiduPCS-Go/baidupcs/netdisksign" "github.com/qjfoidnh/BaiduPCS-Go/requester" "github.com/tidwall/gjson" "io/ioutil" @@ -34,8 +33,6 @@ func (pcs *BaiduPCS) GenerateShareQueryURL(subPath string, params map[string]str uv := shareURL.Query() uv.Set("time", strconv.Itoa(int(time.Now().UnixMilli()))) uv.Set("clienttype", "1") - uv.Set("cuid", netdisksign.DevUID(pcs.GetBDUSS())) - uv.Set("devuid", netdisksign.DevUID(pcs.GetBDUSS())) for key, value := range params { uv.Set(key, value) } diff --git a/internal/pcscommand/transfer.go b/internal/pcscommand/transfer.go index 9cfe73c..0555231 100644 --- a/internal/pcscommand/transfer.go +++ b/internal/pcscommand/transfer.go @@ -3,7 +3,6 @@ package pcscommand import ( "encoding/base64" "fmt" - "net/url" "path" "regexp" "strconv" @@ -81,14 +80,16 @@ func RunShareTransfer(params []string, opt *baidupcs.TransferOption) { return } - sekey, _ := url.QueryUnescape(randsk) - featuremap["sekey"] = sekey + //sekey, _ := url.QueryUnescape(randsk) + //featuremap["sekey"] = sekey featuremap["bdstoken"] = tokens["bdstoken"] featuremap["root"] = "1" - featuremap["share_type"] = "100" + featuremap["web"] = "1" + featuremap["app_id"] = "250528" + featuremap["shorturl"] = featurestr[1:] //featuremap["devuid"] = baidupcs. featuremap["timestamp"] = strconv.Itoa(int(time.Now().Unix())) - featuremap["channel"] = "android_7.0_EVA-AL10_bd-netdisk_1523a" + featuremap["channel"] = "chunlei" queryShareInfoUrl := pcs.GenerateShareQueryURL("list", featuremap).String() //metajsonstr := tokens["metajson"] trans_metas := pcs.ExtractShareInfo(queryShareInfoUrl)