| | |
| | | return taoBaoGoods;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public static TaoBaoGoodsBrief convert(DaTaoKeDetailV2 detail) {
|
| | | TaoBaoGoodsBrief taoBaoGoods = new TaoBaoGoodsBrief();
|
| | | taoBaoGoods.setAuctionId(detail.getGoodsId());
|
| | |
| | |
|
| | | String result = null;
|
| | | try {
|
| | | Connection.Response doc = Jsoup.connect(url).ignoreContentType(true)
|
| | | .timeout(1000*10)
|
| | | Connection.Response doc = Jsoup.connect(url).ignoreContentType(true).timeout(1000 * 10)
|
| | | .userAgent(
|
| | | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362")
|
| | | .header("Accept", "text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8")
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 从文本中提取淘口令
|
| | | * @Title: getTokenListFromText
|
| | | * @Description: |
| | | * @param str
|
| | | * @return |
| | | * List<String> 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static List<String> getTokenListFromText(String str) {
|
| | | String pattern = "(₳{1}[A-Za-z0-9]+₳{1})|(¥{1}[A-Za-z0-9]+¥{1})|(¥{1}[A-Za-z0-9]+¥{1})|(€{1}[A-Za-z0-9]+€{1})";
|
| | | Pattern r = Pattern.compile(pattern);
|
| | | Matcher m = r.matcher(str);
|
| | | List<String> urlList = new ArrayList<>();
|
| | | while (m.find()) {
|
| | | urlList.add(m.group());
|
| | | }
|
| | | return urlList;
|
| | | }
|
| | |
|
| | | }
|