1

I'm trying to download webpages in .html from a list of urls, but some of these websites use session cookies and when I attempt Jsoup.connect("url") and I get a 403.
So, I used the Map / HashMap as how to manage cookies with Jsoup, maintain cookies and session with Jsoup, retrieve cookies.., but still 403.

What really amazed me is that a really simple app as Mac Automator can do the job, actually only save text not html, but still...

Does anyone know how to get past this cookies setback? An example using this page would be great. http://pubs.acs.org/doi/full/10.1021/ja312087x

thx!!!

Community
  • 1
  • 1
user1709694
  • 322
  • 4
  • 5

1 Answers1

1

Look at this answer https://stackoverflow.com/a/15369631/516167

You need to open page, and after this send form data (login,password), cookies and other parameters required with POST.

Community
  • 1
  • 1
MariuszS
  • 30,646
  • 12
  • 114
  • 155