Package org.jsoup

Examples of org.jsoup.Connection.post()


      int count = 0;
      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;
View Full Code Here


    int pageNo = 1;
    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;
View Full Code Here

      boolean skipout = false;
      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;
View Full Code Here

    try {
      Connection conn = null;
      String url = "http://www.hq6m.com/?act=login_check&user="+user+"&pwd="+pwd;
      conn = ConnectionManager.getInstance().getConnection(url);
//        conn.cookie("id", "21").data("id","21","page",""+pageNo,"rows","50");
      Document doc = conn.post();
      String res = doc.text();
      System.out.println(res);
      if ("用户名格式不正确,登陆密码不正确,错误[错误码: -5]".indexOf(res)>-1
          || "密码格式不正确".indexOf(res) > -1) {
       
View Full Code Here

                    .data("password", password)
                    .data("w", "1280:800")
                    .data("s1", "Login")
                    .data("lowRes", "0")
                    .data("login", String.valueOf(System.currentTimeMillis()));
            Document d = c.post();
            return new Session(this, c.response().cookies());
        } catch (Exception e) {
            return null;
        }
    }
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.