<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### 第1關:清洗HTML文檔中無意義數據 ``` public Document getDoc(String filePath) throws IOException{ File input = new File(filePath); // File file=new File("./backups/hotels.ctrip.com_domestic-city-hotel.txt"); Document document =Jsoup.parse(input,"UTF-8","http://www.ctrip.com/"); return document ; } /** * 獲取清理后的信息 * @param doc * @return */ public List<String> cleanHTML(Document doc){ List<String> aa=new ArrayList<>(); String bb =Jsoup.clean(doc.toString() ,Whitelist.basic()); String cc =Jsoup.clean(doc.toString() ,Whitelist.simpleText()); aa.add(bb); aa.add(cc); return aa; } ``` ### 第2關:獲取攜程網北京市的所有酒店信息 ``` public List<Hotel> getHotle(String hotelResult){ List<Hotel> a = new ArrayList<Hotel>(); JSONObject b = JSONObject.parseObject(hotelResult); List<Hotel> c = JSON.parseArray(b.getString("hotelPositionJSON"), Hotel.class); // 增加價格數據 JSONArray hotelsPrice = b.getJSONArray("htllist"); if (hotelsPrice != null && !hotelsPrice.isEmpty()) { for (int i = 0; i < c.size(); i++) { JSONObject priceObj = hotelsPrice.getJSONObject(i); if (priceObj != null && !priceObj.isEmpty()) { Hotel hotel = c.get(i); String hotelId = priceObj.getString("hotelid"); double price = priceObj.getDoubleValue("amount"); if (hotel.getId().equals(hotelId)) { hotel.setPrice(price); } } } } a.addAll(c); return a; } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看