import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import org.apache.http.Consts;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpResponseException;
import org.apache.http.client.ResponseHandler;
import org.apache.http.client.config.CookieSpecs;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.BufferedHttpEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ningze.db.model.T003ProductInfo;
import com.ningze.rest.xiaobu.XiaobuAPI;
/**
* **银行理财数据爬取
*
* @author ROCK
*
*/
public class KunlunBank {
public static void main(String[] args) throws ClientProtocolException, IOException, ParseException {
System.out.println(KunlunBank.getData());
//getData();
}
public static List<T003ProductInfo> getData() throws ClientProtocolException, IOException, ParseException {
RequestConfig globalConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.DEFAULT).build();
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(globalConfig).build();
RequestConfig localConfig = RequestConfig.copy(globalConfig).setCookieSpec(CookieSpecs.STANDARD_STRICT).build();
String url_1 = "https://www.eklb.cn";
//创建HttpGet实例
HttpGet httpGet = new HttpGet(url_1);
httpGet.setConfig(localConfig);
//创建响应处理器处理服务器响应内容
ResponseHandler<String> veriCodeHandler = handler();
//二次请求获取cookie覆盖第一次请求,证明是同一个浏览器访问,真正获取请求
String response &