mirror of https://github.com/Xhofe/alist
parent
1c01dc6839
commit
a4ad98ee3e
|
@ -91,8 +91,8 @@ func (d *PikPak) Init(ctx context.Context) (err error) {
|
||||||
ClientID: d.ClientID,
|
ClientID: d.ClientID,
|
||||||
ClientSecret: d.ClientSecret,
|
ClientSecret: d.ClientSecret,
|
||||||
Endpoint: oauth2.Endpoint{
|
Endpoint: oauth2.Endpoint{
|
||||||
AuthURL: "https://user.mypikpak.com/v1/auth/signin",
|
AuthURL: "https://user.mypikpak.net/v1/auth/signin",
|
||||||
TokenURL: "https://user.mypikpak.com/v1/auth/token",
|
TokenURL: "https://user.mypikpak.net/v1/auth/token",
|
||||||
AuthStyle: oauth2.AuthStyleInParams,
|
AuthStyle: oauth2.AuthStyleInParams,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ func (d *PikPak) Init(ctx context.Context) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取CaptchaToken
|
// 获取CaptchaToken
|
||||||
err = d.RefreshCaptchaTokenAtLogin(GetAction(http.MethodGet, "https://api-drive.mypikpak.com/drive/v1/files"), d.Common.GetUserID())
|
err = d.RefreshCaptchaTokenAtLogin(GetAction(http.MethodGet, "https://api-drive.mypikpak.net/drive/v1/files"), d.Common.GetUserID())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ func (d *PikPak) Link(ctx context.Context, file model.Obj, args model.LinkArgs)
|
||||||
if !d.DisableMediaLink {
|
if !d.DisableMediaLink {
|
||||||
queryParams["usage"] = "CACHE"
|
queryParams["usage"] = "CACHE"
|
||||||
}
|
}
|
||||||
_, err := d.request(fmt.Sprintf("https://api-drive.mypikpak.com/drive/v1/files/%s", file.GetID()),
|
_, err := d.request(fmt.Sprintf("https://api-drive.mypikpak.net/drive/v1/files/%s", file.GetID()),
|
||||||
http.MethodGet, func(req *resty.Request) {
|
http.MethodGet, func(req *resty.Request) {
|
||||||
req.SetQueryParams(queryParams)
|
req.SetQueryParams(queryParams)
|
||||||
}, &resp)
|
}, &resp)
|
||||||
|
@ -200,7 +200,7 @@ func (d *PikPak) Link(ctx context.Context, file model.Obj, args model.LinkArgs)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPak) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error {
|
func (d *PikPak) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error {
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/files", http.MethodPost, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/files", http.MethodPost, func(req *resty.Request) {
|
||||||
req.SetBody(base.Json{
|
req.SetBody(base.Json{
|
||||||
"kind": "drive#folder",
|
"kind": "drive#folder",
|
||||||
"parent_id": parentDir.GetID(),
|
"parent_id": parentDir.GetID(),
|
||||||
|
@ -211,7 +211,7 @@ func (d *PikPak) MakeDir(ctx context.Context, parentDir model.Obj, dirName strin
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPak) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
|
func (d *PikPak) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/files:batchMove", http.MethodPost, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/files:batchMove", http.MethodPost, func(req *resty.Request) {
|
||||||
req.SetBody(base.Json{
|
req.SetBody(base.Json{
|
||||||
"ids": []string{srcObj.GetID()},
|
"ids": []string{srcObj.GetID()},
|
||||||
"to": base.Json{
|
"to": base.Json{
|
||||||
|
@ -223,7 +223,7 @@ func (d *PikPak) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPak) Rename(ctx context.Context, srcObj model.Obj, newName string) error {
|
func (d *PikPak) Rename(ctx context.Context, srcObj model.Obj, newName string) error {
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/files/"+srcObj.GetID(), http.MethodPatch, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/files/"+srcObj.GetID(), http.MethodPatch, func(req *resty.Request) {
|
||||||
req.SetBody(base.Json{
|
req.SetBody(base.Json{
|
||||||
"name": newName,
|
"name": newName,
|
||||||
})
|
})
|
||||||
|
@ -232,7 +232,7 @@ func (d *PikPak) Rename(ctx context.Context, srcObj model.Obj, newName string) e
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPak) Copy(ctx context.Context, srcObj, dstDir model.Obj) error {
|
func (d *PikPak) Copy(ctx context.Context, srcObj, dstDir model.Obj) error {
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/files:batchCopy", http.MethodPost, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/files:batchCopy", http.MethodPost, func(req *resty.Request) {
|
||||||
req.SetBody(base.Json{
|
req.SetBody(base.Json{
|
||||||
"ids": []string{srcObj.GetID()},
|
"ids": []string{srcObj.GetID()},
|
||||||
"to": base.Json{
|
"to": base.Json{
|
||||||
|
@ -244,7 +244,7 @@ func (d *PikPak) Copy(ctx context.Context, srcObj, dstDir model.Obj) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPak) Remove(ctx context.Context, obj model.Obj) error {
|
func (d *PikPak) Remove(ctx context.Context, obj model.Obj) error {
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/files:batchTrash", http.MethodPost, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/files:batchTrash", http.MethodPost, func(req *resty.Request) {
|
||||||
req.SetBody(base.Json{
|
req.SetBody(base.Json{
|
||||||
"ids": []string{obj.GetID()},
|
"ids": []string{obj.GetID()},
|
||||||
})
|
})
|
||||||
|
@ -268,7 +268,7 @@ func (d *PikPak) Put(ctx context.Context, dstDir model.Obj, stream model.FileStr
|
||||||
}
|
}
|
||||||
|
|
||||||
var resp UploadTaskData
|
var resp UploadTaskData
|
||||||
res, err := d.request("https://api-drive.mypikpak.com/drive/v1/files", http.MethodPost, func(req *resty.Request) {
|
res, err := d.request("https://api-drive.mypikpak.net/drive/v1/files", http.MethodPost, func(req *resty.Request) {
|
||||||
req.SetBody(base.Json{
|
req.SetBody(base.Json{
|
||||||
"kind": "drive#file",
|
"kind": "drive#file",
|
||||||
"name": stream.GetName(),
|
"name": stream.GetName(),
|
||||||
|
@ -292,9 +292,9 @@ func (d *PikPak) Put(ctx context.Context, dstDir model.Obj, stream model.FileStr
|
||||||
|
|
||||||
params := resp.Resumable.Params
|
params := resp.Resumable.Params
|
||||||
//endpoint := strings.Join(strings.Split(params.Endpoint, ".")[1:], ".")
|
//endpoint := strings.Join(strings.Split(params.Endpoint, ".")[1:], ".")
|
||||||
// web 端上传 返回的endpoint 为 `mypikpak.com` | android 端上传 返回的endpoint 为 `vip-lixian-07.mypikpak.com`·
|
// web 端上传 返回的endpoint 为 `mypikpak.net` | android 端上传 返回的endpoint 为 `vip-lixian-07.mypikpak.net`·
|
||||||
if d.Addition.Platform == "android" {
|
if d.Addition.Platform == "android" {
|
||||||
params.Endpoint = "mypikpak.com"
|
params.Endpoint = "mypikpak.net"
|
||||||
}
|
}
|
||||||
|
|
||||||
if stream.GetSize() <= 10*utils.MB { // 文件大小 小于10MB,改用普通模式上传
|
if stream.GetSize() <= 10*utils.MB { // 文件大小 小于10MB,改用普通模式上传
|
||||||
|
@ -318,7 +318,7 @@ func (d *PikPak) OfflineDownload(ctx context.Context, fileUrl string, parentDir
|
||||||
}
|
}
|
||||||
|
|
||||||
var resp OfflineDownloadResp
|
var resp OfflineDownloadResp
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/files", http.MethodPost, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/files", http.MethodPost, func(req *resty.Request) {
|
||||||
req.SetBody(requestBody)
|
req.SetBody(requestBody)
|
||||||
}, &resp)
|
}, &resp)
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ PHASE_TYPE_RUNNING, PHASE_TYPE_ERROR, PHASE_TYPE_COMPLETE, PHASE_TYPE_PENDING
|
||||||
*/
|
*/
|
||||||
func (d *PikPak) OfflineList(ctx context.Context, nextPageToken string, phase []string) ([]OfflineTask, error) {
|
func (d *PikPak) OfflineList(ctx context.Context, nextPageToken string, phase []string) ([]OfflineTask, error) {
|
||||||
res := make([]OfflineTask, 0)
|
res := make([]OfflineTask, 0)
|
||||||
url := "https://api-drive.mypikpak.com/drive/v1/tasks"
|
url := "https://api-drive.mypikpak.net/drive/v1/tasks"
|
||||||
|
|
||||||
if len(phase) == 0 {
|
if len(phase) == 0 {
|
||||||
phase = []string{"PHASE_TYPE_RUNNING", "PHASE_TYPE_ERROR", "PHASE_TYPE_COMPLETE", "PHASE_TYPE_PENDING"}
|
phase = []string{"PHASE_TYPE_RUNNING", "PHASE_TYPE_ERROR", "PHASE_TYPE_COMPLETE", "PHASE_TYPE_PENDING"}
|
||||||
|
@ -377,7 +377,7 @@ func (d *PikPak) OfflineList(ctx context.Context, nextPageToken string, phase []
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPak) DeleteOfflineTasks(ctx context.Context, taskIDs []string, deleteFiles bool) error {
|
func (d *PikPak) DeleteOfflineTasks(ctx context.Context, taskIDs []string, deleteFiles bool) error {
|
||||||
url := "https://api-drive.mypikpak.com/drive/v1/tasks"
|
url := "https://api-drive.mypikpak.net/drive/v1/tasks"
|
||||||
params := map[string]string{
|
params := map[string]string{
|
||||||
"task_ids": strings.Join(taskIDs, ","),
|
"task_ids": strings.Join(taskIDs, ","),
|
||||||
"delete_files": strconv.FormatBool(deleteFiles),
|
"delete_files": strconv.FormatBool(deleteFiles),
|
||||||
|
|
|
@ -86,51 +86,51 @@ const (
|
||||||
WebClientID = "YUMx5nI8ZU8Ap8pm"
|
WebClientID = "YUMx5nI8ZU8Ap8pm"
|
||||||
WebClientSecret = "dbw2OtmVEeuUvIptb1Coyg"
|
WebClientSecret = "dbw2OtmVEeuUvIptb1Coyg"
|
||||||
WebClientVersion = "2.0.0"
|
WebClientVersion = "2.0.0"
|
||||||
WebPackageName = "mypikpak.com"
|
WebPackageName = "mypikpak.net"
|
||||||
WebSdkVersion = "8.0.3"
|
WebSdkVersion = "8.0.3"
|
||||||
PCClientID = "YvtoWO6GNHiuCl7x"
|
PCClientID = "YvtoWO6GNHiuCl7x"
|
||||||
PCClientSecret = "1NIH5R1IEe2pAxZE3hv3uA"
|
PCClientSecret = "1NIH5R1IEe2pAxZE3hv3uA"
|
||||||
PCClientVersion = "undefined" // 2.5.6.4831
|
PCClientVersion = "undefined" // 2.5.6.4831
|
||||||
PCPackageName = "mypikpak.com"
|
PCPackageName = "mypikpak.net"
|
||||||
PCSdkVersion = "8.0.3"
|
PCSdkVersion = "8.0.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
var DlAddr = []string{
|
var DlAddr = []string{
|
||||||
"dl-a10b-0621.mypikpak.com",
|
"dl-a10b-0621.mypikpak.net",
|
||||||
"dl-a10b-0622.mypikpak.com",
|
"dl-a10b-0622.mypikpak.net",
|
||||||
"dl-a10b-0623.mypikpak.com",
|
"dl-a10b-0623.mypikpak.net",
|
||||||
"dl-a10b-0624.mypikpak.com",
|
"dl-a10b-0624.mypikpak.net",
|
||||||
"dl-a10b-0625.mypikpak.com",
|
"dl-a10b-0625.mypikpak.net",
|
||||||
"dl-a10b-0858.mypikpak.com",
|
"dl-a10b-0858.mypikpak.net",
|
||||||
"dl-a10b-0859.mypikpak.com",
|
"dl-a10b-0859.mypikpak.net",
|
||||||
"dl-a10b-0860.mypikpak.com",
|
"dl-a10b-0860.mypikpak.net",
|
||||||
"dl-a10b-0861.mypikpak.com",
|
"dl-a10b-0861.mypikpak.net",
|
||||||
"dl-a10b-0862.mypikpak.com",
|
"dl-a10b-0862.mypikpak.net",
|
||||||
"dl-a10b-0863.mypikpak.com",
|
"dl-a10b-0863.mypikpak.net",
|
||||||
"dl-a10b-0864.mypikpak.com",
|
"dl-a10b-0864.mypikpak.net",
|
||||||
"dl-a10b-0865.mypikpak.com",
|
"dl-a10b-0865.mypikpak.net",
|
||||||
"dl-a10b-0866.mypikpak.com",
|
"dl-a10b-0866.mypikpak.net",
|
||||||
"dl-a10b-0867.mypikpak.com",
|
"dl-a10b-0867.mypikpak.net",
|
||||||
"dl-a10b-0868.mypikpak.com",
|
"dl-a10b-0868.mypikpak.net",
|
||||||
"dl-a10b-0869.mypikpak.com",
|
"dl-a10b-0869.mypikpak.net",
|
||||||
"dl-a10b-0870.mypikpak.com",
|
"dl-a10b-0870.mypikpak.net",
|
||||||
"dl-a10b-0871.mypikpak.com",
|
"dl-a10b-0871.mypikpak.net",
|
||||||
"dl-a10b-0872.mypikpak.com",
|
"dl-a10b-0872.mypikpak.net",
|
||||||
"dl-a10b-0873.mypikpak.com",
|
"dl-a10b-0873.mypikpak.net",
|
||||||
"dl-a10b-0874.mypikpak.com",
|
"dl-a10b-0874.mypikpak.net",
|
||||||
"dl-a10b-0875.mypikpak.com",
|
"dl-a10b-0875.mypikpak.net",
|
||||||
"dl-a10b-0876.mypikpak.com",
|
"dl-a10b-0876.mypikpak.net",
|
||||||
"dl-a10b-0877.mypikpak.com",
|
"dl-a10b-0877.mypikpak.net",
|
||||||
"dl-a10b-0878.mypikpak.com",
|
"dl-a10b-0878.mypikpak.net",
|
||||||
"dl-a10b-0879.mypikpak.com",
|
"dl-a10b-0879.mypikpak.net",
|
||||||
"dl-a10b-0880.mypikpak.com",
|
"dl-a10b-0880.mypikpak.net",
|
||||||
"dl-a10b-0881.mypikpak.com",
|
"dl-a10b-0881.mypikpak.net",
|
||||||
"dl-a10b-0882.mypikpak.com",
|
"dl-a10b-0882.mypikpak.net",
|
||||||
"dl-a10b-0883.mypikpak.com",
|
"dl-a10b-0883.mypikpak.net",
|
||||||
"dl-a10b-0884.mypikpak.com",
|
"dl-a10b-0884.mypikpak.net",
|
||||||
"dl-a10b-0885.mypikpak.com",
|
"dl-a10b-0885.mypikpak.net",
|
||||||
"dl-a10b-0886.mypikpak.com",
|
"dl-a10b-0886.mypikpak.net",
|
||||||
"dl-a10b-0887.mypikpak.com",
|
"dl-a10b-0887.mypikpak.net",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPak) login() error {
|
func (d *PikPak) login() error {
|
||||||
|
@ -139,7 +139,7 @@ func (d *PikPak) login() error {
|
||||||
return errors.New("username or password is empty")
|
return errors.New("username or password is empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
url := "https://user.mypikpak.com/v1/auth/signin"
|
url := "https://user.mypikpak.net/v1/auth/signin"
|
||||||
// 使用 用户填写的 CaptchaToken —————— (验证后的captcha_token)
|
// 使用 用户填写的 CaptchaToken —————— (验证后的captcha_token)
|
||||||
if d.GetCaptchaToken() == "" {
|
if d.GetCaptchaToken() == "" {
|
||||||
if err := d.RefreshCaptchaTokenInLogin(GetAction(http.MethodPost, url), d.Username); err != nil {
|
if err := d.RefreshCaptchaTokenInLogin(GetAction(http.MethodPost, url), d.Username); err != nil {
|
||||||
|
@ -169,7 +169,7 @@ func (d *PikPak) login() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPak) refreshToken(refreshToken string) error {
|
func (d *PikPak) refreshToken(refreshToken string) error {
|
||||||
url := "https://user.mypikpak.com/v1/auth/token"
|
url := "https://user.mypikpak.net/v1/auth/token"
|
||||||
var e ErrResp
|
var e ErrResp
|
||||||
res, err := base.RestyClient.SetRetryCount(1).R().SetError(&e).
|
res, err := base.RestyClient.SetRetryCount(1).R().SetError(&e).
|
||||||
SetHeader("user-agent", "").SetBody(base.Json{
|
SetHeader("user-agent", "").SetBody(base.Json{
|
||||||
|
@ -307,7 +307,7 @@ func (d *PikPak) getFiles(id string) ([]File, error) {
|
||||||
"page_token": pageToken,
|
"page_token": pageToken,
|
||||||
}
|
}
|
||||||
var resp Files
|
var resp Files
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/files", http.MethodGet, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/files", http.MethodGet, func(req *resty.Request) {
|
||||||
req.SetQueryParams(query)
|
req.SetQueryParams(query)
|
||||||
}, &resp)
|
}, &resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -473,7 +473,7 @@ func (d *PikPak) refreshCaptchaToken(action string, metas map[string]string) err
|
||||||
}
|
}
|
||||||
var e ErrResp
|
var e ErrResp
|
||||||
var resp CaptchaTokenResponse
|
var resp CaptchaTokenResponse
|
||||||
_, err := d.request("https://user.mypikpak.com/v1/shield/captcha/init", http.MethodPost, func(req *resty.Request) {
|
_, err := d.request("https://user.mypikpak.net/v1/shield/captcha/init", http.MethodPost, func(req *resty.Request) {
|
||||||
req.SetError(&e).SetBody(param).SetQueryParam("client_id", d.ClientID)
|
req.SetError(&e).SetBody(param).SetQueryParam("client_id", d.ClientID)
|
||||||
}, &resp)
|
}, &resp)
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ func (d *PikPakShare) Init(ctx context.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取CaptchaToken
|
// 获取CaptchaToken
|
||||||
err := d.RefreshCaptchaToken(GetAction(http.MethodGet, "https://api-drive.mypikpak.com/drive/v1/share:batch_file_info"), "")
|
err := d.RefreshCaptchaToken(GetAction(http.MethodGet, "https://api-drive.mypikpak.net/drive/v1/share:batch_file_info"), "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ func (d *PikPakShare) Link(ctx context.Context, file model.Obj, args model.LinkA
|
||||||
"file_id": file.GetID(),
|
"file_id": file.GetID(),
|
||||||
"pass_code_token": d.PassCodeToken,
|
"pass_code_token": d.PassCodeToken,
|
||||||
}
|
}
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/share/file_info", http.MethodGet, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/share/file_info", http.MethodGet, func(req *resty.Request) {
|
||||||
req.SetQueryParams(query)
|
req.SetQueryParams(query)
|
||||||
}, &resp)
|
}, &resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -68,51 +68,51 @@ const (
|
||||||
WebClientID = "YUMx5nI8ZU8Ap8pm"
|
WebClientID = "YUMx5nI8ZU8Ap8pm"
|
||||||
WebClientSecret = "dbw2OtmVEeuUvIptb1Coyg"
|
WebClientSecret = "dbw2OtmVEeuUvIptb1Coyg"
|
||||||
WebClientVersion = "2.0.0"
|
WebClientVersion = "2.0.0"
|
||||||
WebPackageName = "mypikpak.com"
|
WebPackageName = "mypikpak.net"
|
||||||
WebSdkVersion = "8.0.3"
|
WebSdkVersion = "8.0.3"
|
||||||
PCClientID = "YvtoWO6GNHiuCl7x"
|
PCClientID = "YvtoWO6GNHiuCl7x"
|
||||||
PCClientSecret = "1NIH5R1IEe2pAxZE3hv3uA"
|
PCClientSecret = "1NIH5R1IEe2pAxZE3hv3uA"
|
||||||
PCClientVersion = "undefined" // 2.5.6.4831
|
PCClientVersion = "undefined" // 2.5.6.4831
|
||||||
PCPackageName = "mypikpak.com"
|
PCPackageName = "mypikpak.net"
|
||||||
PCSdkVersion = "8.0.3"
|
PCSdkVersion = "8.0.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
var DlAddr = []string{
|
var DlAddr = []string{
|
||||||
"dl-a10b-0621.mypikpak.com",
|
"dl-a10b-0621.mypikpak.net",
|
||||||
"dl-a10b-0622.mypikpak.com",
|
"dl-a10b-0622.mypikpak.net",
|
||||||
"dl-a10b-0623.mypikpak.com",
|
"dl-a10b-0623.mypikpak.net",
|
||||||
"dl-a10b-0624.mypikpak.com",
|
"dl-a10b-0624.mypikpak.net",
|
||||||
"dl-a10b-0625.mypikpak.com",
|
"dl-a10b-0625.mypikpak.net",
|
||||||
"dl-a10b-0858.mypikpak.com",
|
"dl-a10b-0858.mypikpak.net",
|
||||||
"dl-a10b-0859.mypikpak.com",
|
"dl-a10b-0859.mypikpak.net",
|
||||||
"dl-a10b-0860.mypikpak.com",
|
"dl-a10b-0860.mypikpak.net",
|
||||||
"dl-a10b-0861.mypikpak.com",
|
"dl-a10b-0861.mypikpak.net",
|
||||||
"dl-a10b-0862.mypikpak.com",
|
"dl-a10b-0862.mypikpak.net",
|
||||||
"dl-a10b-0863.mypikpak.com",
|
"dl-a10b-0863.mypikpak.net",
|
||||||
"dl-a10b-0864.mypikpak.com",
|
"dl-a10b-0864.mypikpak.net",
|
||||||
"dl-a10b-0865.mypikpak.com",
|
"dl-a10b-0865.mypikpak.net",
|
||||||
"dl-a10b-0866.mypikpak.com",
|
"dl-a10b-0866.mypikpak.net",
|
||||||
"dl-a10b-0867.mypikpak.com",
|
"dl-a10b-0867.mypikpak.net",
|
||||||
"dl-a10b-0868.mypikpak.com",
|
"dl-a10b-0868.mypikpak.net",
|
||||||
"dl-a10b-0869.mypikpak.com",
|
"dl-a10b-0869.mypikpak.net",
|
||||||
"dl-a10b-0870.mypikpak.com",
|
"dl-a10b-0870.mypikpak.net",
|
||||||
"dl-a10b-0871.mypikpak.com",
|
"dl-a10b-0871.mypikpak.net",
|
||||||
"dl-a10b-0872.mypikpak.com",
|
"dl-a10b-0872.mypikpak.net",
|
||||||
"dl-a10b-0873.mypikpak.com",
|
"dl-a10b-0873.mypikpak.net",
|
||||||
"dl-a10b-0874.mypikpak.com",
|
"dl-a10b-0874.mypikpak.net",
|
||||||
"dl-a10b-0875.mypikpak.com",
|
"dl-a10b-0875.mypikpak.net",
|
||||||
"dl-a10b-0876.mypikpak.com",
|
"dl-a10b-0876.mypikpak.net",
|
||||||
"dl-a10b-0877.mypikpak.com",
|
"dl-a10b-0877.mypikpak.net",
|
||||||
"dl-a10b-0878.mypikpak.com",
|
"dl-a10b-0878.mypikpak.net",
|
||||||
"dl-a10b-0879.mypikpak.com",
|
"dl-a10b-0879.mypikpak.net",
|
||||||
"dl-a10b-0880.mypikpak.com",
|
"dl-a10b-0880.mypikpak.net",
|
||||||
"dl-a10b-0881.mypikpak.com",
|
"dl-a10b-0881.mypikpak.net",
|
||||||
"dl-a10b-0882.mypikpak.com",
|
"dl-a10b-0882.mypikpak.net",
|
||||||
"dl-a10b-0883.mypikpak.com",
|
"dl-a10b-0883.mypikpak.net",
|
||||||
"dl-a10b-0884.mypikpak.com",
|
"dl-a10b-0884.mypikpak.net",
|
||||||
"dl-a10b-0885.mypikpak.com",
|
"dl-a10b-0885.mypikpak.net",
|
||||||
"dl-a10b-0886.mypikpak.com",
|
"dl-a10b-0886.mypikpak.net",
|
||||||
"dl-a10b-0887.mypikpak.com",
|
"dl-a10b-0887.mypikpak.net",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *PikPakShare) request(url string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) {
|
func (d *PikPakShare) request(url string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) {
|
||||||
|
@ -159,7 +159,7 @@ func (d *PikPakShare) getSharePassToken() error {
|
||||||
"limit": "100",
|
"limit": "100",
|
||||||
}
|
}
|
||||||
var resp ShareResp
|
var resp ShareResp
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/share", http.MethodGet, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/share", http.MethodGet, func(req *resty.Request) {
|
||||||
req.SetQueryParams(query)
|
req.SetQueryParams(query)
|
||||||
}, &resp)
|
}, &resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -187,7 +187,7 @@ func (d *PikPakShare) getFiles(id string) ([]File, error) {
|
||||||
"pass_code_token": d.PassCodeToken,
|
"pass_code_token": d.PassCodeToken,
|
||||||
}
|
}
|
||||||
var resp ShareResp
|
var resp ShareResp
|
||||||
_, err := d.request("https://api-drive.mypikpak.com/drive/v1/share/detail", http.MethodGet, func(req *resty.Request) {
|
_, err := d.request("https://api-drive.mypikpak.net/drive/v1/share/detail", http.MethodGet, func(req *resty.Request) {
|
||||||
req.SetQueryParams(query)
|
req.SetQueryParams(query)
|
||||||
}, &resp)
|
}, &resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -345,7 +345,7 @@ func (d *PikPakShare) refreshCaptchaToken(action string, metas map[string]string
|
||||||
}
|
}
|
||||||
var e ErrResp
|
var e ErrResp
|
||||||
var resp CaptchaTokenResponse
|
var resp CaptchaTokenResponse
|
||||||
_, err := d.request("https://user.mypikpak.com/v1/shield/captcha/init", http.MethodPost, func(req *resty.Request) {
|
_, err := d.request("https://user.mypikpak.net/v1/shield/captcha/init", http.MethodPost, func(req *resty.Request) {
|
||||||
req.SetError(&e).SetBody(param)
|
req.SetError(&e).SetBody(param)
|
||||||
}, &resp)
|
}, &resp)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue