|
@@ -57,9 +57,10 @@ func GetProductInteriorUrlBody(body string) (itemResp []*models.ProductInteriorU
|
|
|
if match != nil {
|
|
|
for _, v := range match {
|
|
|
//过滤不相干的超链接
|
|
|
- if !strings.Contains(v, material) && !strings.Contains(v, activity) && strings.Contains(v, indepth) {
|
|
|
+ if !strings.Contains(v, material) && !strings.Contains(v, activity) && !strings.Contains(v, indepth) {
|
|
|
continue
|
|
|
}
|
|
|
+ fmt.Println(v)
|
|
|
body = strings.Replace(body, fmt.Sprint("href=\"", v, "\""), "", -1)
|
|
|
body = strings.Replace(body, fmt.Sprint("<a >"), "", -1)
|
|
|
body = strings.Replace(body, fmt.Sprint("</a>"), "", -1)
|
|
@@ -67,6 +68,7 @@ func GetProductInteriorUrlBody(body string) (itemResp []*models.ProductInteriorU
|
|
|
urlMap[v] = v
|
|
|
}
|
|
|
}
|
|
|
+ fmt.Println(urlMap)
|
|
|
sliceBody := strings.Split(body, randStr)
|
|
|
var sliceBodyUrl []string
|
|
|
for _, v := range sliceBody {
|