Hello,
I needed to save cookies between scraper sessions and lost lost of time with it.
Maybe this can be useful to somebody... It's working for me.
Scraper scraper = new Scraper(config, "./tmp");
scraper.getHttpClientManager().getHttpClient().getState().addCookies(cookiejar );
scraper.execute();
cookiejar = scraper.getHttpClientManager().getHttpClient().getState().getCookies();
Hope it helps :)
Nuno
Log in to post a comment.
Hello,
I needed to save cookies between scraper sessions and lost lost of time with
it.
Maybe this can be useful to somebody... It's working for me.
Scraper scraper = new Scraper(config, "./tmp");
scraper.getHttpClientManager().getHttpClient().getState().addCookies(cookiejar
);
scraper.execute();
cookiejar =
scraper.getHttpClientManager().getHttpClient().getState().getCookies();
Hope it helps :)
Nuno