| | |
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | |
| | | TaoBaoGoodsBrief tb = null;
|
| | | String URL_REGEX = "(((http|https)://)|(www\\.))[a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,6}(:[0-9]{1,4})?(/[a-zA-Z0-9\\&%_\\./-~-]*)?";
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | | String pattern = "^[A-Za-z0-9-]+$";
|
| | | if (Pattern.matches(pattern, text.replace(" ", ""))) {//删除空格
|
| | | if (Pattern.matches(pattern, text.replace(" ", ""))) {// 删除空格
|
| | | out.println(JsonUtil.loadFalseResult("不支持推荐"));
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | CommonGoods commonGoods = null;
|
| | | text = matcher.group();
|
| | | if (text.contains("ju.taobao.com") || text.contains(".juhuasuan.com")) {// 聚划算
|
| | |
|
| | | if (text.startsWith("https://a.m.taobao.com/i"))// 淘宝账号未登录状态
|
| | | {
|
| | | text = text.substring("https://a.m.taobao.com/i".length(), text.indexOf(".htm"));
|
| | | if (NumberUtil.isNumeric(text)) {
|
| | | tb = TaoBaoUtil.isAlimama(text);
|
| | | }
|
| | | } else if (text.contains("ju.taobao.com") || text.contains(".juhuasuan.com")) {// 聚划算
|
| | | int index = text.indexOf("item_id");
|
| | | if (index < 0) {
|
| | | out.println(JsonUtil.loadFalseResult("暂未找到该商品,请稍后再试!"));
|