Jsoup --获取页面表格数据
可以使用json,根据页面结构获取页面表格的指定内容
依赖
    <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>1.14.1</version>
    </dependency>
获取指定页面的表格(使用getElementById)
     /**
      * @Description: 获取人员列表element
      * @param cookiefro cookie 前缀 ,personUrl 人员列表地址 cookie
      * @return ${return_type}
      * @throws
      * @author 康世行
      * @date 2021-10-10 23:35
      */
    private Element classManageTable(String cookieFro, String personUrl, String cookie){
        String personNameListHtml = HttpUtils.sendHttHtml(cookieFro+cookie, personUrl);
        Document parse = Jsoup.parse(personNameListHtml);//转换为Document
        Element classManageTable = parse.getElementById("classManageTable");//获取表格
        return classManageTable;
    }
    欢迎访问csdn的博客:
https://blog.csdn.net/kangshihang1998?spm=1010.2135.3001.5343
 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号