增加番号获取规则
This commit is contained in:
parent
b2a406aef9
commit
24f71f9acb
@ -80,6 +80,11 @@ func (c *Crawler) getCodeNum(s string) int {
|
||||
// 获取封面代码列表
|
||||
func (c *Crawler) getCoverCodeList(files []string) (coverList []string, err error) {
|
||||
for _, file := range files {
|
||||
// 去除域名部分
|
||||
if strings.IndexRune(file, '@') > 0 {
|
||||
file = strings.Split(file, "@")[1]
|
||||
}
|
||||
|
||||
nameSlice := strings.Split(file, "-")
|
||||
if len(nameSlice) < 2 || len(nameSlice[0]) > 5 {
|
||||
continue
|
||||
@ -146,7 +151,6 @@ func (c *Crawler) fetchCoverImg(code string) error {
|
||||
}
|
||||
|
||||
// 图片高度未到达配置最低值则抛弃
|
||||
fmt.Println(img.Width, img.Height)
|
||||
if img.Height < c.config.GetInt("crawler.minHeight") {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user