Use of cookies through htmlunit



  • Like, htmlunit Use the spiders on the same website. I'm gonna go down to the site, and I'm gonna make it work. It's written that the entry was successful. I'm on the main page of this site and it says I didn't bail.
    Creating. WebClient so:

            final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_45);
            webClient.getOptions().setJavaScriptEnabled(true);
            webClient.getOptions().setRedirectEnabled(true);
            webClient.getOptions().setThrowExceptionOnScriptError(false);
            webClient.getOptions().setCssEnabled(false);
            webClient.getOptions().setUseInsecureSSL(true);
            webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
            webClient.getCache().setMaxSize(0);
            CookieManager cm = new CookieManager();
            webClient.setCookieManager(cm);
    

    Writing:

    WARNING: Cookie rejected [phpbb3_la4i4_u="6020", version:0, domain:unity3d.ru, path:/, expiry:Fri Aug 11 02:26:54 VLAT 2017] Illegal 'domain' attribute "unity3d.ru". Domain of origin: "sync.audtd.com"
    авг 11, 2016 2:26:52 AM org.apache.http.client.protocol.ResponseProcessCookies processCookies
    WARNING: Cookie rejected [phpbb3_la4i4_k="", version:0, domain:unity3d.ru, path:/, expiry:Fri Aug 11 02:26:54 VLAT 2017] Illegal 'domain' attribute "unity3d.ru". Domain of origin: "sync.audtd.com"
    авг 11, 2016 2:26:52 AM org.apache.http.client.protocol.ResponseProcessCookies processCookies
    WARNING: Cookie rejected [phpbb3_la4i4_sid="40411e762a59c3ce238e765b05a5af58", version:0, domain:unity3d.ru, path:/, expiry:Fri Aug 11 02:26:54 VLAT 2017] Illegal 'domain' attribute "unity3d.ru". Domain of origin: "sync.audtd.com"
    авг 11, 2016 2:26:53 AM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify
    

    And so many writings.



  • Before the click on the copycat button, JavaScript

    webClient.getOptions().setJavaScriptEnabled(false);
    

    Payable




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2