当前位置:   article > 正文

java+uniapp+vue彩票系统源代码(2024年)_uniapp java 源代码

uniapp java 源代码
  1. qq:850103945
  2. if (ObjectUtil.equal(page.getUrl().toString(), CrawlingAddressConstant.URL1)) {
  3. List<FootballMatchDO> footballMatchList = new ArrayList<>();
  4. List<Selectable> nodes = html.css(".bet-date-wrap").nodes();
  5. for (int i = 1; i <= nodes.size(); i++) {
  6. Selectable selectableDate = html.xpath("//*[@id='relativeContainer']//*[@class='bet-date-wrap'][" + (i + 1) + "]");
  7. Selectable selectableTable = html.xpath("//*[@id='relativeContainer']//*[@class='bet-tb-dg'][" + i + "]");
  8. List<Selectable> tr = selectableTable.css("tr").nodes();
  9. int index = 0;
  10. for (int j = 0; j < tr.size(); j++) {
  11. String match = tr.get(j).css(".bet-tb-tr .td-evt a", "text").toString();
  12. String number = tr.get(j).css(".bet-tb-tr .td-no a", "text").toString();
  13. if (StrUtil.isBlank(match) && StrUtil.isBlank(number)) {
  14. continue;
  15. }
  16. index += 2;
  17. FootballMatchDO footballMatch = new FootballMatchDO();
  18. footballMatch.setStartTime(selectableDate.css(".bet-date", "text").get());
  19. footballMatch.setNumber(number);
  20. footballMatch.setMatch(match);
  21. String color = tr.get(j).xpath("//*[@class='td-evt']/a/@style").toString();
  22. footballMatch.setColor(color.substring(color.indexOf("#"), color.length() - 1));
  23. footballMatch.setOpenTime(tr.get(j).css(".td-endtime", "text").toString());
  24. footballMatch.setHomeTeam(tr.get(j).css(".td-team .team-l i", "text").toString() + tr.get(j).css(".td-team .team-l a", "text").toString());
  25. footballMatch.setVisitingTeam(tr.get(j).css(".td-team .team-r i", "text").toString() + tr.get(j).css(".td-team .team-r a", "text").toString());
  26. footballMatch.setLetBall(tr.get(j).css(".td-rang .itm-rangA2", "text").toString());
  27. footballMatch.setNotLetOdds(StrUtil.join(",", tr.get(j).css(".itm-rangB1 .betbtn span:first-child", "text").all()).replaceAll(",↑", "").replaceAll(",↓", ""));
  28. footballMatch.setLetOdds(StrUtil.join(",", tr.get(j).css(".itm-rangB2 .betbtn span:first-child", "text").all()).replaceAll(",↑", "").replaceAll(",↓", ""));
  29. footballMatch.setIsSingle((tr.get(j).css(".td-rang .itm-rangA1 .ico-dg", "text").toString()) != null || (tr.get(j).css(".td-rang .itm-rangA2 .ico-dg", "text").toString()) != null ? "1" : "0");
  30. footballMatch.setHalfWholeOdds(StrUtil.join(",", html.xpath("/html/body/div[6]/div/div[3]/table[" + i + "]/tbody/tr[" + index + "]/td/div/table[1]/tbody/tr/td/p/i/text()").all()).replaceAll(",↑", "").replaceAll(",↓", ""));
  31. footballMatch.setScoreOdds(StrUtil.join(",", html.xpath("/html/body/div[6]/div/div[3]/table[" + i + "]/tbody/tr[" + index + "]/td/div/table[2]/tbody/tr/td/p/i/text()").all()).replaceAll(",↑", "").replaceAll(",↓", ""));
  32. footballMatch.setGoalOdds(StrUtil.join(",", html.xpath("/html/body/div[6]/div/div[3]/table[" + i + "]/tbody/tr[" + index + "]/td/div/table[3]/tbody/tr/td/p/i/text()").all()).replaceAll(",↑", "").replaceAll(",↓", ""));
  33. footballMatch.setDeadline(LotteryAlgorithmUtil.calculationDeadline(footballMatch.getOpenTime(), footballMatch.getStartTime()));
  34. footballMatch.setCreateTime(new Date());
  35. footballMatch.setUpdateTime(new Date());
  36. footballMatchList.add(footballMatch);
  37. }
  38. }
  39. page.putField("footballGoalList", footballMatchList);

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/826940?site
推荐阅读
相关标签
  

闽ICP备14008679号