🎨 Network assets to local assets ignore webpage

This commit is contained in:
Daniel 2023-12-25 12:32:13 +08:00
parent 8b12b51c52
commit 3de21e0a9e
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -325,6 +325,11 @@ func NetAssets2LocalAssets(rootID string) (err error) {
request := browserClient.R()
request.SetRetryCount(1).SetRetryFixedInterval(3 * time.Second)
resp, reqErr := request.Get(u)
if strings.Contains(strings.ToLower(resp.GetContentType()), "text/html") {
// 忽略超链接网页
return ast.WalkContinue
}
if nil != reqErr {
logging.LogErrorf("download network asset [%s] failed: %s", u, reqErr)
return ast.WalkContinue