Skip to content

Commit 394a18c

Browse files
skysliencesSky_slience
andauthored
Fix 123 download (#9235)
* fix(driver): handle additional HTTP status code 210 for URL redirection * fix(driver): 123 download url error --------- Co-authored-by: Sky_slience <Skyslience@spdzy.com>
1 parent 280960c commit 394a18c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/123/driver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ func (d *Pan123) Link(ctx context.Context, file model.Obj, args model.LinkArgs)
113113
log.Debugln("res code: ", res.StatusCode())
114114
if res.StatusCode() == 302 {
115115
link.URL = res.Header().Get("location")
116+
} else if res.StatusCode() == 210 {
117+
link.URL = downloadUrl
116118
} else if res.StatusCode() < 300 {
117119
link.URL = utils.Json.Get(res.Body(), "data", "redirect_url").ToString()
118120
}

0 commit comments

Comments
 (0)