my Boss told me to write a HTML parser which is fetching some table datas.... well, I´m stuck here and there and really need your help :)
First of all, I need to login to the website, and then navigate to another url ( I hope that it will work with cookies) and fetching the datas.
The Loginform got the Username & Password field and a selection list with a lot of options, I like to choose the second option..how I can do this?
Here are my code I already got:
System.setProperty("javax.net.ssl.trustStore", "C:\\unicert.jks");
Response res = Jsoup.connect("URL to Loginform")
.data("u", "UsernameHere")
.data("p", "PasswortHere")
.data("r", "Second Option")
.method(Method.POST).execute();
Map<String, String> loginCookies = res.cookies(); //Getting the Cookies
Document doc2 = Jsoup.connect(url).cookies(loginCookies).get(); //loading new Site with Cookies
I would love to here from you :) thanks a lot! Alex