0
Я пытаюсь войти в почту yahoo с jaunt-api, но получаю «cookie not enabled issue». Я новичок в jaunt-api, поэтому, пожалуйста, помогите мне. Я использую следующий код.Jaunt-api cookie issue
try
{
UserAgent userAgent = new UserAgent();
userAgent.setCacheEnabled(false);
userAgent.settings.autoSaveAsHTML = true;
try{
userAgent.cookieJar.saveCookies(new File("e:\\cookie.txt"));
}catch(Exception e){}
userAgent.visit("https://login.yahoo.com/m");
try{
userAgent.cookieJar.loadCookies(new File("e:\\cookie.txt"));
}catch(Exception e){}
Form form = userAgent.doc.getForm(0);
form.setTextField("username", "*****@gmail.com");
form.setPassword("passwd", "*******");
form.submit();
System.out.println(userAgent.doc.innerHTML());
System.out.println(userAgent.getLocation());
}catch(JauntException e){
System.out.println(e);
}