野子电竞数据官网改版https://www.xxe.io/全新登场
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.List;

/**

  • @API: 5.比赛联赛资料

  • @Website: https://www.xxe.io/
    */
    public class FootballLeagueInfo {

    public static void main(String[] args) {
    try {
    String content = getContent();

         JAXBContext jaxbContext = JAXBContext.newInstance(LeagueList.class);Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();LeagueList leagueList = (LeagueList) unmarshaller.unmarshal(new ByteArrayInputStream(content.getBytes()));leagueList.getLeagueList().forEach(item -> System.out.println(item));} catch (Throwable t) {t.printStackTrace();}
    

    }

    /**

    • 获取API返回内容
    • Note: 这里为了方便测试我使用了一份本地文件,使用时应替换为真实接口返回内容
      */
      private static String getContent() {
      try {
      StringBuilder builder = new StringBuilder();
      List lines = Files.readAllLines(Paths.get("./src/main/resources/FootballLeagueInfo.xml"), StandardCharsets.UTF_8);
      lines.forEach(line -> builder.append(line));
      return builder.toString();
      } catch (Throwable t) {
      t.printStackTrace();
      return “”;
      }
      }

    @XmlRootElement(name = “list”)
    public static class LeagueList {
    @XmlElement(name = “match”)
    private List leagueList;

     public List<League> getLeagueList() {return leagueList;}
    

    }

    @XmlRootElement
    public static class League {
    @XmlElement
    private String id;
    @XmlElement
    private String gb_short;
    @XmlElement
    private String big_short;
    @XmlElement
    private String en_short;
    @XmlElement
    private String gb;
    @XmlElement
    private String big;
    @XmlElement
    private String en;
    @XmlElement
    private int type;
    @XmlElement
    private String subSclass;
    @XmlElement
    private int sum_round;
    @XmlElement
    private int curr_round;
    @XmlElement
    private String Curr_matchSeason;
    @XmlElement
    private String countryID;
    @XmlElement
    private String country;
    @XmlElement
    private String areaID;
    @XmlElement
    private String countryEn;
    @XmlElement
    private String logo;
    @XmlElement
    private String countryLogo;

     @Overridepublic String toString() {return "League{" +"id='" + id + '\'' +", gb_short='" + gb_short + '\'' +", big_short='" + big_short + '\'' +", en_short='" + en_short + '\'' +", gb='" + gb + '\'' +", big='" + big + '\'' +", en='" + en + '\'' +", type=" + type +", subSclass='" + subSclass + '\'' +", sum_round=" + sum_round +", curr_round=" + curr_round +", Curr_matchSeason='" + Curr_matchSeason + '\'' +", countryID='" + countryID + '\'' +", country='" + country + '\'' +", areaID='" + areaID + '\'' +", countryEn='" + countryEn + '\'' +", logo='" + logo + '\'' +", countryLogo='" + countryLogo + '\'' +'}';}public String getId() {return id;}public String getGb_short() {return gb_short;}public String getBig_short() {return big_short;}public String getEn_short() {return en_short;}public String getGb() {return gb;}public String getBig() {return big;}public String getEn() {return en;}public int getType() {return type;}public String getSubSclass() {return subSclass;}public int getSum_round() {return sum_round;}public int getCurr_round() {return curr_round;}public String getCurr_matchSeason() {return Curr_matchSeason;}public String getCountryID() {return countryID;}public String getCountry() {return country;}public String getAreaID() {return areaID;}public String getCountryEn() {return countryEn;}public String getLogo() {return logo;}public String getCountryLogo() {return countryLogo;}
    

    }
    }

如何获取足球【比赛联赛资料】数据相关推荐

  1. 足球比赛中的数据科学

    各位小伙伴们大家好,不知道最近大家有没有看世界杯,本期Jesse就想跟大家来聊聊足球比赛中的数据科学,也希望用轻松的话题,让我们享受世界杯带给我们的快乐. 本文仅代表个人观点,如有偏颇之处,还请海涵- ...

  2. python模拟足球比赛_如何使用python从livescores获取足球比赛结果

    大家好,我有这个项目正在使用python3.4我想刮livescore.com网站对于足球成绩(结果),例如获得当天的所有分数(英格兰2-2挪威,法国2-1意大利)等等,我正在用Python3.4,W ...

  3. 足球比赛数据可视分析

    点击上方蓝字关注我们 足球比赛数据可视分析 曹安琪1,2, 陈泓宇2, 谢潇2, 巫英才1,2 1 之江实验室,浙江 杭州 310012 2 浙江大学计算机辅助设计与图形学国家重点实验室,浙江 杭州 ...

  4. UWB高精度定位落地:UWB助力体育领域的应用探索(足球比赛,体能测试)

    一.UWB体育运动场景测试 来源:Experimental Evaluation of UWB Indoor Positioning for Sport Postures(比利时根特大学) UWB室内 ...

  5. nokogiri 足球比赛数据

    抓取足球比赛数据 View Code 1 require 'open-uri' 2 require 'nokogiri' 3 require 'pp' 4 require 'json' 5 6 7 u ...

  6. 免费数据 | CnOpenData国际足球比赛结果数据

    ** CnOpenData国际足球比赛结果数据 ** 目录 CnOpenData国际足球比赛结果数据 一.数据简介 二.时间区间 三.字段展示 四.样本数据 五.字段更新频率 一.数据简介 足球是大量 ...

  7. 足球数据API接口 - 【比赛动画直播数据】API调用示例代码

    分享接口调用的示例代码,篮球数据[比赛动画直播数据]接口 package com.huaying.demo.football;import javax.xml.bind.JAXBContext; im ...

  8. 数据标注案例分析-足球比赛时间轴打点标注项目

    什么是时间轴打点标注? 时间轴打点标注是按照时间顺序直观地表明某一事件或某一过程的步骤,使得复杂的信息易于理解. 时间轴打点标注广泛应用于项目管理.业务分析和演示.体育行业.教学中. 我们通过打点标注 ...

  9. 纳米数据世界杯数据接口,中超数据,体育数据比分,世界杯赛程api,足球比赛实时数据接口

    体育科技是体育产业发展的强力助推器,而在诸多体育新科技中,大数据和人工智能无疑担当着重要的角色之一.互联网时代,数据是最珍贵的资源,大数据正引领传统行业并与之结合,催生出新的活力.几乎各行各业都在拥抱 ...

最新文章

  1. 文件没有图标,无法打开(以pdf为例)
  2. Qt C++属性类型提供给 QML调用(三)
  3. 内存溢出_关于PermGen Space内存溢出解决方案
  4. 思科CCIE认证知识点之IPv6地址
  5. ES6 Map对象的使用
  6. 重启服务器导致网站系统错误,win10怎么总是莫名其妙重启?_网站服务器运行维护...
  7. Ecshop最新版v.272本地包含漏洞Oday
  8. 编写贩卖《和平精英》游戏外挂,5人被判刑;苹果推出轻App码;Firefox 84.0发布|极客头条...
  9. 快捷键 自动调整顺序_关于代码自动补全快捷键无法使用的新解决方案
  10. 自动优化Windows Xp批处理文件
  11. App Crash 详解
  12. Python 从零开始制作自己的声音 - wave模块读写wav文件详解
  13. IDEA 使用 hibernate
  14. 本地缓存之LIFO、LRU、FIFO、LFU实现
  15. 机器学习预测世界杯球队冠
  16. APP开发学习思路指导
  17. 二、【玩转 华为Atlas200 DK】之连接电脑和Atlas 200
  18. 第5次作业+160+曾元鹏
  19. win10系统ping服务器,win10怎么ping ip地址_win10怎样ping本机ip地址
  20. 《企业管理概论》在线平时作业2

热门文章

  1. 关于Autodesk View and Data API的一些问题
  2. Windows-bat或exe文件设置为开机自动启动项或服务项
  3. 海兰一体计算机配置,打造年轻人的第一台吃鸡设备:海兰A700一体机
  4. 【Http2.0】Http2.0
  5. python要学些什么_Python到底学什么?新手应该注重哪些方面的技术?
  6. android recovery 模式吗,安卓(Android)手机Recovery模式各项中英文对照详细说明
  7. 截取计算机全屏画面的方法是按,下列用于截取计算机全屏画面的方法不正确的是()。...
  8. 无法打开迅雷,无法下载,无法打开qq空间等的处理方法
  9. 如何下载迅雷(狗狗)屏蔽的资源?
  10. 写在2019年末的一些话