| | |
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
|
| | | import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | |
| | | try {
|
| | | client.executeMethod(pm);
|
| | | String result = pm.getResponseBodyAsString();
|
| | | LogHelper.test("拼多多猜你喜欢:"+result);
|
| | | JSONObject json = JSONObject.fromObject(result);
|
| | | JSONArray array = json.optJSONArray("data");
|
| | | if (array != null) {
|
| | |
| | |
|
| | | return goods;
|
| | | }
|
| | | |
| | | public static String getPDDGoodsId(String url) {
|
| | | try {
|
| | | if (url.startsWith("https://mobile.yangkeduo.com/goods.html?")
|
| | | || url.startsWith("http://mobile.yangkeduo.com/goods.html?")||url.contains("yangkeduo.com/duo_coupon_landing.html?")) {
|
| | | String preUrl = url.substring(url.indexOf("?") + 1, url.length());
|
| | | String[] sts = preUrl.split("&");
|
| | | for (String st : sts) {
|
| | | if (st.startsWith("goods_id=")) {
|
| | | return st.split("=")[1].trim();
|
| | | }
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | | }
|