jsoup截取HTML页面中的节点

      
        //请求网络数据
        new Thread(){
            public void run() {
                
                try {
                    //将HTML页面转换为document文档
                    Document document = Jsoup.connect(URL).timeout(5000).get();
                    
                    //获取该页面的某个节点
                    String str = document.getElementById("news_flow").toString();
                    
                    Log.i("TAG", str);
                    
                } catch (IOException e) {
                 
                    e.printStackTrace();
                }
                
            };
        }.start();
        
原文地址:https://www.cnblogs.com/8023-itxinde/p/5342553.html