因为京东添加了滑动验证码,以下方法已经无法使用。
public static void main(String[] args) {
BasicCookieStore cookieStore = new BasicCookieStore();
MyClient client = new MyClient("GBK", cookieStore);
client.get("https://www.jd.com/");
client.showCookies();
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
Document doc = Jsoup.parse(client.get("https://passport.jd.com/new/login.aspx"));
client.showCookies();
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
// System.out.println(doc);
Elements elements = doc.select("form[id=formlogin] input[type=hidden]");
// System.out.println(client.get("https://passport.jd.com/uc/showAuthCode?r=0.7007493122946471&version=2015"));
Map<String, String> map = new HashMap<St