add: MV tags

This commit is contained in:
itouakirai
2025-02-12 08:00:09 +08:00
parent f7fcf41b13
commit 591049cedc
3 changed files with 112 additions and 32 deletions

View File

@@ -355,7 +355,10 @@ func ExtMvData (keyAndUrls string, savePath string)(error) {
fmt.Printf("下载链接 %s 失败:%v\n", url, err)
return err
}
if resp.StatusCode != http.StatusOK {
fmt.Printf("链接 %s 响应失败:%v\n", url, resp.Status)
return errors.New(resp.Status)
}
// 将响应体写入输出文件
_, err = io.Copy(barWriter, resp.Body)
defer resp.Body.Close() // 注意及时关闭响应体,避免资源泄露