ソースを参照

우커머스 판별로직 수정

hakjinlee 1 年間 前
コミット
48c932ce01

+ 2 - 3
controllers/scraper/tct-main.go

@@ -2,6 +2,7 @@ package controllers_scraper
 
 import (
 	"encoding/json"
+	e "github.com/dabory/abango-rest/etc"
 	"kkscrap-go/controllers/scraper/cafe24"
 	"kkscrap-go/controllers/scraper/godo"
 	"kkscrap-go/controllers/scraper/magento"
@@ -16,8 +17,6 @@ import (
 	"regexp"
 	"strings"
 
-	e "github.com/dabory/abango-rest/etc"
-
 	// "golang.org/x/crypto/bcrypt"
 
 	"github.com/labstack/echo"
@@ -216,7 +215,7 @@ func parseSolution(t model.SolutionType, theme, uri, body string) (ret model.Ite
 func getSolutionType(body string) (t model.SolutionType, theme string, reterr error) {
 	if strings.Contains(body, "window.CAFE24") {
 		t = model.SolutionTypeCafe24
-	} else if strings.Contains(body, "woocommerce-page") {
+	} else if strings.Contains(body, "/wp-content/") {
 		t = model.SolutionTypeWooCommerce
 	} else if strings.Contains(body, "고도몰5") {
 		t = model.SolutionTypeGodo

+ 0 - 0
locals/common-func-dev.go-- → locals/common-func-dev.go


+ 0 - 0
locals/gosodium/cryptobox/crypto_box_dev.go-- → locals/gosodium/cryptobox/crypto_box_dev.go


+ 0 - 0
locals/gosodium/cryptobox/crypto_box_easy_dev.go-- → locals/gosodium/cryptobox/crypto_box_easy_dev.go


+ 0 - 0
locals/gosodium/cryptobox/crypto_box_seal_dev.go-- → locals/gosodium/cryptobox/crypto_box_seal_dev.go


+ 3 - 3
test/api.http

@@ -16,17 +16,17 @@ POST http://localhost:19080/solution-type-get
 Content-Type: application/json
 
 {
-  "url": "https://www.iroirotokyo.com/product/%eb%ac%b4%eb%a3%8c%eb%b0%b0%ec%86%a1-%ec%98%a4%eb%a6%ac%ed%9e%88%eb%a1%9c-%ea%b3%a4%ec%95%bd%ec%a0%a4%eb%a6%ac-%ed%8c%8c%ec%9a%b0%ec%b9%98-%ec%b9%bc%eb%a1%9c%eb%a6%ac%ec%a0%9c%eb%a1%9c%eb%b0%b1/"
+  "url": "https://www.mangokuro.com/shop/turkey/"
 }
 ###
 POST http://localhost:19080/product-page-get
 Content-Type: application/json
 
 {
-  "solutionType": "wordpress",
+  "solutionType": "WOOCOMMERCE",
   "themeType": "",
   "products": [
-    {"uri": "https://www.mangokuro.com/shop/turkey/"},
+    {"uri": "https://seoulknit.com"},
     {"uri": "https://www.iroirotokyo.com/product/%eb%ac%b4%eb%a3%8c%eb%b0%b0%ec%86%a1-%ec%98%a4%eb%a6%ac%ed%9e%88%eb%a1%9c-%ea%b3%a4%ec%95%bd%ec%a0%a4%eb%a6%ac-%ed%8c%8c%ec%9a%b0%ec%b9%98-%ec%b9%bc%eb%a1%9c%eb%a6%ac%ec%a0%9c%eb%a1%9c%eb%b0%b1/"}
   ]
 }