@@ -14,22 +14,22 @@ import (
1414// RunShareTransfer 执行分享链接转存到网盘
1515func RunShareTransfer (params []string , opt * baidupcs.TransferOption ) {
1616 var link string
17- var extracode string
17+ var extraCode string
1818 if len (params ) == 1 {
1919 link = params [0 ]
2020 if strings .Contains (link , "bdlink=" ) || ! strings .Contains (link , "pan.baidu.com/" ) {
21- RunRapidTransfer (link , opt .Rname )
22- // fmt.Printf("%s失败: %s\n", baidupcs.OperationShareFileSavetoLocal, "秒传已不再被支持")
21+ // RunRapidTransfer(link, opt.Rname)
22+ fmt .Printf ("%s失败: %s\n " , baidupcs .OperationShareFileSavetoLocal , "秒传已不再被支持" )
2323 return
2424 }
25- extracode = "none"
25+ extraCode = "none"
2626 if strings .Contains (link , "?pwd=" ) {
27- extracode = strings .Split (link , "?pwd=" )[1 ]
27+ extraCode = strings .Split (link , "?pwd=" )[1 ]
2828 link = strings .Split (link , "?pwd=" )[0 ]
2929 }
3030 } else if len (params ) == 2 {
3131 link = params [0 ]
32- extracode = params [1 ]
32+ extraCode = params [1 ]
3333 }
3434 if link [len (link )- 1 :] == "/" {
3535 link = link [0 : len (link )- 1 ]
@@ -39,7 +39,7 @@ func RunShareTransfer(params []string, opt *baidupcs.TransferOption) {
3939 if strings .Contains (featureStr , "init?" ) {
4040 featureStr = "1" + strings .Split (featureStr , "=" )[1 ]
4141 }
42- if len (featureStr ) > 23 || featureStr [0 :1 ] != "1" || len (extracode ) != 4 {
42+ if len (featureStr ) > 23 || featureStr [0 :1 ] != "1" || len (extraCode ) != 4 {
4343 fmt .Printf ("%s失败: %s\n " , baidupcs .OperationShareFileSavetoLocal , "链接地址或提取码非法" )
4444 return
4545 }
@@ -50,15 +50,15 @@ func RunShareTransfer(params []string, opt *baidupcs.TransferOption) {
5050 return
5151 }
5252
53- if extracode != "none" {
53+ if extraCode != "none" {
5454 verifyUrl := pcs .GenerateShareQueryURL ("verify" , map [string ]string {
5555 "shareid" : tokens ["shareid" ],
5656 "time" : strconv .Itoa (int (time .Now ().UnixMilli ())),
5757 "clienttype" : "1" ,
5858 "uk" : tokens ["share_uk" ],
5959 }).String ()
6060 res := pcs .PostShareQuery (verifyUrl , link , map [string ]string {
61- "pwd" : extracode ,
61+ "pwd" : extraCode ,
6262 "vcode" : "null" ,
6363 "vcode_str" : "null" ,
6464 "bdstoken" : tokens ["bdstoken" ],
@@ -79,7 +79,7 @@ func RunShareTransfer(params []string, opt *baidupcs.TransferOption) {
7979 "bdstoken" : tokens ["bdstoken" ],
8080 "root" : "1" ,
8181 "web" : "5" ,
82- "app_id" : "250528" ,
82+ "app_id" : baidupcs . PanAppID ,
8383 "shorturl" : featureStr [1 :],
8484 "channel" : "chunlei" ,
8585 }
0 commit comments