Skip to content

Commit

Permalink
fix transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
qjfoidnh committed Dec 11, 2024
1 parent 8c7eb06 commit 07b19a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 0 additions & 3 deletions baidupcs/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down
11 changes: 6 additions & 5 deletions internal/pcscommand/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package pcscommand
import (
"encoding/base64"
"fmt"
"net/url"
"path"
"regexp"
"strconv"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 07b19a0

Please sign in to comment.