- SplitSkuName don't use comment as name

- add DownloadFileByURL
- refactor UploadWeimobImg4SkuName
- ignore RefreshMissingDadaStores error
- add BuildSkuFromEbaiStore
This commit is contained in:
gazebo
2019-03-20 09:31:33 +08:00
parent d0587fef0a
commit d8b7b41b01
8 changed files with 311 additions and 23 deletions

View File

@@ -8,7 +8,6 @@ import (
"strings"
"sync"
"time"
"unicode/utf8"
"github.com/fatih/structs"
@@ -322,12 +321,12 @@ func SplitSkuName(skuName string) (prefix, name, comment, specUnit, unit string,
}
comment = TrimDecorationChar(comment)
name = TrimDecorationChar(searchResult[2])
if comment != "" {
if utf8.RuneCountInString(comment) <= 5 {
name += "-" + comment
comment = ""
}
}
// if comment != "" {
// // if utf8.RuneCountInString(comment) <= 5 {
// // name += "-" + comment
// // comment = ""
// // }
// }
specUnit = strings.ToLower(strings.Replace(searchResult[5], "克", "g", -1))
if specUnit == "l" {
specUnit = "L"