瀏覽代碼

230927-1316-Kim

EricKIm 1 年之前
父節點
當前提交
7ed073ec88
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      main.go

+ 5 - 4
main.go

@@ -11,8 +11,9 @@ import (
 
 func main() {
 	// Wordpress
-	url := "https://addand.kr/shop/new-%ed%95%9c-%ea%b6%8c%ec%9c%bc%eb%a1%9c-%eb%81%9d%eb%82%98%eb%8a%94-%eb%85%b8%ec%85%98/" // Replace with the URL of your choice
+	url := "https://addand.kr/shop/new-%ed%95%9c-%ea%b6%8c%ec%9c%bc%eb%a1%9c-%eb%81%9d%eb%82%98%eb%8a%94-%eb%85%b8%ec%85%98/"
 
+	// url := "https://seoulknit.com/shop/collar-half-sleeved-top_blue/"
 	// Send an HTTP GET request to the URL
 	response, err := http.Get(url)
 	if err != nil {
@@ -68,16 +69,16 @@ func main() {
 		embed, _ := element.Attr("src")
 		vdos = append(vdos, embed)
 	})
-	fmt.Printf("ItemImages: %s\n", vdos)
+	fmt.Printf("ItemVideos: %s\n", vdos)
 
 	imgs := []string{}
+	fmt.Println("ItemImages: ")
 	doc.Find(cItemImages).Each(func(index int, element *goquery.Selection) {
 		img, _ := element.Attr("src")
 		imgs = append(imgs, img)
+		fmt.Println("", img)
 	})
 
-	fmt.Printf("ItemImages: %s\n", imgs)
-
 }
 
 func findEmail(body string, doms string) (emails []string) {