Package org.jsoup.nodes

Examples of org.jsoup.nodes.Document.text()


      boolean skipout = false;
      do {
        conn = ConnectionManager.getInstance().getConnection(url);
        conn.cookie("id", id).data("id",id,"page",""+pageNo,"rows","50");
        doc = conn.post();
        res = doc.text();
        JSONArray rows = JSONObject.fromObject(res).getJSONArray("rows");
        count = count + rows.size();
        for (Object object : rows) {
          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(day) == -1) {
View Full Code Here


//      today = "20140917";
      XmlUtils utils = new XmlUtils();
      Connection conn = ConnectionManager.getInstance().getConnection(url);
      conn.cookie("id", id).data("id",id,"page",""+pageNo,"rows","10");
      Document doc = conn.post();
      String res = doc.text();
      JSONObject obj = JSONObject.fromObject(res);
      int total = obj.getInt("total");
      int count = 0;
      boolean skipout = false;
      do {
View Full Code Here

      boolean skipout = false;
      do {
        conn = ConnectionManager.getInstance().getConnection(url);
        conn.cookie("id", id).data("id",id,"page",""+pageNo,"rows","50");
        doc = conn.post();
        res = doc.text();
        JSONArray rows = JSONObject.fromObject(res).getJSONArray("rows");
        count = count + rows.size();
        for (Object object : rows) {
          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(today) == -1) {
View Full Code Here

      String today = new SimpleDateFormat("yyyyMMdd").format(new Date());
      XmlUtils utils = new XmlUtils();
      Connection conn = ConnectionManager.getInstance().getConnection(url);
      conn.cookie("id", id).data("id",id,"page",""+pageNo,"rows","10");
      Document doc = conn.post();
      String res = doc.text();
      JSONObject obj = JSONObject.fromObject(res);
      int total = obj.getInt("total");
      int count = 0;
      boolean skipout = false;
      do {
View Full Code Here

      boolean skipout = false;
      do {
        conn = ConnectionManager.getInstance().getConnection(url);
        conn.cookie("id", id).data("id",id,"page",""+pageNo,"rows","50");
        doc = conn.post();
        res = doc.text();
        JSONArray rows = JSONObject.fromObject(res).getJSONArray("rows");
        count = count + rows.size();
        for (Object object : rows) {
          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(today) == -1) {
View Full Code Here

    try {
      XmlUtils utils = new XmlUtils();
      Connection conn = ConnectionManager.getInstance().getConnection(url);
      conn.cookie("id", "103").data("id","103","page",""+pageNo,"rows","10");
      Document doc = conn.post();
      String res = doc.text();
      JSONObject obj = JSONObject.fromObject(res);
      int total = obj.getInt("total");
//      System.out.println(total);
      int count = 0;
      boolean skipout = false;
View Full Code Here

      String today = new SimpleDateFormat("yyyyMMdd").format(new Date());
      do {
        conn = ConnectionManager.getInstance().getConnection(url);
        conn.cookie("id", "103").data("id","103","page",""+pageNo,"rows","50");
        doc = conn.post();
        res = doc.text();
        JSONArray rows = JSONObject.fromObject(res).getJSONArray("rows");
        count = count + rows.size();
        for (Object object : rows) {
          JSONObject row = (JSONObject) object;
          if (row.getString("phase").indexOf(today) == -1) {
View Full Code Here

      doc = ConnectionManager.getInstance().getDocument(url);
    } catch (Exception e) {
     
    }
   
    String resultStr = doc.text();
    Map<String,Object> infoMap = new HashMap<String, Object>();
   
    JSONObject object = null;
    try {
      object = JSONObject.fromObject("{\""+resultStr.substring(resultStr.indexOf("totalItem")));
View Full Code Here

      doc = ConnectionManager.getInstance().getDocument(url);
    } catch (Exception e) {
      logger.error("connect fail..", e);
      return 0;
    }
    String resultStr = doc.text();
    if (resultStr.indexOf("totalPage") == -1) {
      logger.error("content get failed(获取元素失败).."+url);
      return 0;
    }
    linkPages = Integer.parseInt(resultStr.substring(resultStr.indexOf("totalPage")+11, resultStr.lastIndexOf("sale")-2));
View Full Code Here

    if (doc == null) {
      unGetLinkUrls.add(url);
      logger.error("content get failed(doc == null).."+url);
      return resList;
    }
    String resultStr = doc.text();
    resList.addAll(getDetailLinkes(resultStr));
    return resList;
  }
 
  //{"progress":100,"amountMoney":"25678.00","status":2,"minBuy":"0.00","issueId":11055568,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.