提交 ee1ac0ad authored 作者: 梁业锦's avatar 梁业锦 💬

增加了新的爬虫,重新排布了爬虫模块的代码

上级 2bd473d3
...@@ -19,6 +19,7 @@ import java.net.URISyntaxException; ...@@ -19,6 +19,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -45,6 +46,17 @@ public class AberCrombieFitchSpider implements IItemSpider { ...@@ -45,6 +46,17 @@ public class AberCrombieFitchSpider implements IItemSpider {
return resultJson; return resultJson;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param content 主要的页面数据 * @param content 主要的页面数据
......
...@@ -17,6 +17,7 @@ import java.net.URISyntaxException; ...@@ -17,6 +17,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -49,6 +50,17 @@ public class AdidasSpider implements IItemSpider { ...@@ -49,6 +50,17 @@ public class AdidasSpider implements IItemSpider {
return resultJson; return resultJson;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param content 主要的页面数据 * @param content 主要的页面数据
......
...@@ -17,6 +17,7 @@ import java.net.URISyntaxException; ...@@ -17,6 +17,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -52,6 +53,17 @@ public class CoachSpider implements IItemSpider { ...@@ -52,6 +53,17 @@ public class CoachSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param dataMap 主要的Json数据 * @param dataMap 主要的Json数据
......
...@@ -17,6 +17,7 @@ import java.net.URISyntaxException; ...@@ -17,6 +17,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -45,6 +46,17 @@ public class EspritSpider implements IItemSpider { ...@@ -45,6 +46,17 @@ public class EspritSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* *
......
...@@ -19,6 +19,7 @@ import java.net.URISyntaxException; ...@@ -19,6 +19,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -48,6 +49,17 @@ public class GucciSpider implements IItemSpider { ...@@ -48,6 +49,17 @@ public class GucciSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param content 主要的网页内容 * @param content 主要的网页内容
......
...@@ -23,6 +23,7 @@ import java.net.URISyntaxException; ...@@ -23,6 +23,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -51,6 +52,17 @@ public class HmSpider implements IItemSpider { ...@@ -51,6 +52,17 @@ public class HmSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* *
......
...@@ -17,6 +17,7 @@ import java.net.URISyntaxException; ...@@ -17,6 +17,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -49,6 +50,17 @@ public class LeviSpider implements IItemSpider { ...@@ -49,6 +50,17 @@ public class LeviSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param dataMap 主要的Json数据 * @param dataMap 主要的Json数据
......
...@@ -20,6 +20,7 @@ import java.net.URISyntaxException; ...@@ -20,6 +20,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
/** /**
* MajeSpider 数据爬虫 * MajeSpider 数据爬虫
...@@ -44,6 +45,17 @@ public class MajeSpider implements IItemSpider { ...@@ -44,6 +45,17 @@ public class MajeSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param content 主要的页面数据 * @param content 主要的页面数据
......
...@@ -18,6 +18,7 @@ import java.net.URISyntaxException; ...@@ -18,6 +18,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
/** /**
* Massimo Dutti 数据爬虫 * Massimo Dutti 数据爬虫
...@@ -49,6 +50,17 @@ public class MassimoduttiSpider implements IItemSpider { ...@@ -49,6 +50,17 @@ public class MassimoduttiSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param dataMap 主要的 json 数据 * @param dataMap 主要的 json 数据
......
...@@ -16,6 +16,7 @@ import java.net.URISyntaxException; ...@@ -16,6 +16,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -51,6 +52,17 @@ public class MocoSpider implements IItemSpider { ...@@ -51,6 +52,17 @@ public class MocoSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* *
......
...@@ -20,6 +20,7 @@ import java.net.URISyntaxException; ...@@ -20,6 +20,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
/** /**
* OchirlySpider 数据爬虫 * OchirlySpider 数据爬虫
...@@ -45,6 +46,17 @@ public class OchirlySpider implements IItemSpider { ...@@ -45,6 +46,17 @@ public class OchirlySpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param content 主要的页面数据 * @param content 主要的页面数据
......
...@@ -18,6 +18,7 @@ import java.net.URISyntaxException; ...@@ -18,6 +18,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
/** /**
* Oysho 数据爬虫 * Oysho 数据爬虫
...@@ -52,6 +53,17 @@ public class OyshoSpider implements IItemSpider { ...@@ -52,6 +53,17 @@ public class OyshoSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* *
......
...@@ -18,6 +18,7 @@ import java.net.URISyntaxException; ...@@ -18,6 +18,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
/** /**
* 西班牙年轻时尚品牌-PullAndBear 数据爬虫 * 西班牙年轻时尚品牌-PullAndBear 数据爬虫
...@@ -35,16 +36,31 @@ public class PullandbearSpider implements IItemSpider { ...@@ -35,16 +36,31 @@ public class PullandbearSpider implements IItemSpider {
*/ */
@Override @Override
public JSONObject captureItem(String targetUrl) throws URISyntaxException, IOException, ExecutionException, InterruptedException, TimeoutException { public JSONObject captureItem(String targetUrl) throws URISyntaxException, IOException, ExecutionException, InterruptedException, TimeoutException {
JSONObject resultJson = new JSONObject();
if (!urlPattern(targetUrl)) {
resultJson.put("message", "不是商品的详情页路径");
return resultJson;
}
String pId = targetUrl.substring(targetUrl.lastIndexOf("p")+1, targetUrl.lastIndexOf(".html")); String pId = targetUrl.substring(targetUrl.lastIndexOf("p")+1, targetUrl.lastIndexOf(".html"));
targetUrl = "https://www.pullandbear.cn/itxrest/2/catalog/store/24009528/20309423/category/0/product/" + pId + "/detail?languageId=-7&appId=1"; targetUrl = "https://www.pullandbear.cn/itxrest/2/catalog/store/24009528/20309423/category/0/product/" + pId + "/detail?languageId=-7&appId=1";
String content = HttpClientUtil.getContentByUrl(targetUrl, PlatformEnum.PULLANDBEAR.getValue()); String content = HttpClientUtil.getContentByUrl(targetUrl, PlatformEnum.PULLANDBEAR.getValue());
JSONObject resultJson = JSONObject.fromObject(content); resultJson = JSONObject.fromObject(content);
ProductResponse productResponse = formatProductResponse(resultJson, pId); ProductResponse productResponse = formatProductResponse(resultJson, pId);
resultJson = JSONObject.fromObject(productResponse); resultJson = JSONObject.fromObject(productResponse);
TranslateHelper.translateProductResponse(resultJson); TranslateHelper.translateProductResponse(resultJson);
return resultJson; return resultJson;
} }
/**
* 正则匹配是否为商品详情页的链接
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "^.*pullandbear\\.cn/.*-c\\d{5,10}p\\d{9,10}.html\\?cS=\\d*";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化 PullAndBear 返回数据 * 格式化 PullAndBear 返回数据
* @see com.diaoyun.zion.chinafrica.bis.impl.PullandbearSpider * @see com.diaoyun.zion.chinafrica.bis.impl.PullandbearSpider
......
...@@ -20,6 +20,7 @@ import java.net.URISyntaxException; ...@@ -20,6 +20,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
/** /**
* Revolve 数据爬虫 * Revolve 数据爬虫
...@@ -44,6 +45,17 @@ public class RevolveSpider implements IItemSpider { ...@@ -44,6 +45,17 @@ public class RevolveSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param content 主要的网页内容 * @param content 主要的网页内容
......
...@@ -17,6 +17,7 @@ import java.net.URISyntaxException; ...@@ -17,6 +17,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
/** /**
* 优衣库数据爬虫 * 优衣库数据爬虫
...@@ -56,6 +57,17 @@ public class UniqloSpider implements IItemSpider { ...@@ -56,6 +57,17 @@ public class UniqloSpider implements IItemSpider {
return resultJson; return resultJson;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 返回格式化数据 * 返回格式化数据
* @param dataMap 调用优衣库网页接口接收的主要商品数据 * @param dataMap 调用优衣库网页接口接收的主要商品数据
......
...@@ -16,6 +16,7 @@ import java.net.URISyntaxException; ...@@ -16,6 +16,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -51,6 +52,17 @@ public class UrbanRevivoSpider implements IItemSpider { ...@@ -51,6 +52,17 @@ public class UrbanRevivoSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化返回数据 * 格式化返回数据
* @param dataMap 主要的 json 数据 * @param dataMap 主要的 json 数据
......
...@@ -17,6 +17,7 @@ import java.net.URISyntaxException; ...@@ -17,6 +17,7 @@ import java.net.URISyntaxException;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate; import static com.diaoyun.zion.master.util.SpiderUtil.exchangeRate;
...@@ -47,6 +48,17 @@ public class ZaraSpider implements IItemSpider { ...@@ -47,6 +48,17 @@ public class ZaraSpider implements IItemSpider {
return resultObj; return resultObj;
} }
/**
* 正则匹配是否为商品详情页的链接
* TODO 正则编写
* @param targetUrl url路径
* @return 匹配失败则返回错误信息
*/
private boolean urlPattern(String targetUrl) {
String regex = "";
return Pattern.matches(regex, targetUrl);
}
/** /**
* 格式化 Zara 返回数据 * 格式化 Zara 返回数据
* @param dataMap 主要的 json 数据 * @param dataMap 主要的 json 数据
......
...@@ -76,31 +76,31 @@ public class SpiderServiceImpl implements SpiderService { ...@@ -76,31 +76,31 @@ public class SpiderServiceImpl implements SpiderService {
platformEnum = PlatformEnum.HM; platformEnum = PlatformEnum.HM;
} else if(targetUrl.contains("adidas.com") && targetUrl.contains("item")) { } else if(targetUrl.contains("adidas.com") && targetUrl.contains("item")) {
platformEnum=PlatformEnum.ADIDAS; platformEnum=PlatformEnum.ADIDAS;
} else if(targetUrl.contains("http://www.lily.sh.cn/webapp/wcs/stores/servlet/lilystore")) { } else if(targetUrl.contains("lily")) {
platformEnum=PlatformEnum.LILY; platformEnum=PlatformEnum.LILY;
} else if(targetUrl.contains("eifini")) { } else if(targetUrl.contains("eifini")) {
platformEnum=PlatformEnum.EIFINI; platformEnum=PlatformEnum.EIFINI;
} else if(targetUrl.contains("wap.ur") && targetUrl.contains("product")) { } else if(targetUrl.contains("wap")) {
platformEnum=PlatformEnum.URBANREVIVO; platformEnum=PlatformEnum.URBANREVIVO;
} else if(targetUrl.contains("abercrombie")) { } else if(targetUrl.contains("abercrombie")) {
platformEnum=PlatformEnum.ABERCROMBIEFITCH; platformEnum=PlatformEnum.ABERCROMBIEFITCH;
} else if(targetUrl.contains("ochirly.com") && targetUrl.contains("p/mobile/")) { } else if(targetUrl.contains("ochirly.com")) {
platformEnum=PlatformEnum.OCHIRLY; platformEnum=PlatformEnum.OCHIRLY;
} else if(targetUrl.contains("esprit") && targetUrl.contains("product") && targetUrl.contains("styleNo") && targetUrl.contains("skucode")) { } else if(targetUrl.contains("esprit")) {
platformEnum=PlatformEnum.ESPRIT; platformEnum=PlatformEnum.ESPRIT;
} else if(targetUrl.contains("levi.com") && targetUrl.contains("product") && targetUrl.contains("styleNo")) { } else if(targetUrl.contains("levi.com")) {
platformEnum=PlatformEnum.LEVI; platformEnum=PlatformEnum.LEVI;
} else if(targetUrl.contains("moco.com/moco/")) { } else if(targetUrl.contains("moco.com/moco/")) {
platformEnum=PlatformEnum.MOCO; platformEnum=PlatformEnum.MOCO;
} else if (targetUrl.contains("massimodutti") && targetUrl.contains("colorId") && targetUrl.contains("categoryId")) { } else if (targetUrl.contains("massimodutti")) {
platformEnum = PlatformEnum.MASSIMODUTTI; platformEnum = PlatformEnum.MASSIMODUTTI;
} else if (targetUrl.contains("coach")) { } else if (targetUrl.contains("coach")) {
platformEnum = PlatformEnum.COACH; platformEnum = PlatformEnum.COACH;
} else if (targetUrl.contains("revolve")) { } else if (targetUrl.contains("revolve")) {
platformEnum = PlatformEnum.REVOLVE; platformEnum = PlatformEnum.REVOLVE;
} else if (targetUrl.contains("vans.com") && targetUrl.contains("wap/product")) { } else if (targetUrl.contains("vans.com")) {
platformEnum = PlatformEnum.VANS; platformEnum = PlatformEnum.VANS;
} else if (targetUrl.contains("oysho") && (targetUrl.contains("origenId") || targetUrl.contains("colorId")) ) { } else if (targetUrl.contains("oysho")) {
platformEnum = PlatformEnum.OYSHO; platformEnum = PlatformEnum.OYSHO;
} else if (targetUrl.contains("stradivarius")) { } else if (targetUrl.contains("stradivarius")) {
platformEnum = PlatformEnum.STRADIVARIUS; platformEnum = PlatformEnum.STRADIVARIUS;
...@@ -110,11 +110,11 @@ public class SpiderServiceImpl implements SpiderService { ...@@ -110,11 +110,11 @@ public class SpiderServiceImpl implements SpiderService {
platformEnum = PlatformEnum.GUCCI; platformEnum = PlatformEnum.GUCCI;
} else if (targetUrl.contains("burberry.com")) { } else if (targetUrl.contains("burberry.com")) {
platformEnum = PlatformEnum.BURBERRY; platformEnum = PlatformEnum.BURBERRY;
} else if (targetUrl.contains("prada.com") && targetUrl.contains("products")) { } else if (targetUrl.contains("prada.com")) {
platformEnum = PlatformEnum.PRADA; platformEnum = PlatformEnum.PRADA;
} else if (targetUrl.contains("fendi")) { } else if (targetUrl.contains("fendi")) {
platformEnum = PlatformEnum.FENDI; platformEnum = PlatformEnum.FENDI;
} else if (targetUrl.contains("apple") && targetUrl.contains("buy")) { } else if (targetUrl.contains("apple")) {
platformEnum = PlatformEnum.APPLE; platformEnum = PlatformEnum.APPLE;
} else if (targetUrl.contains("louisvuitton")) { } else if (targetUrl.contains("louisvuitton")) {
platformEnum = PlatformEnum.LOUISVUITTON; platformEnum = PlatformEnum.LOUISVUITTON;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论