Maybe a few (some actually) months is too late, but I found that I had to take some breaks on the website where the site was designed to be really confusing (the site on which I needed to extract the data). You also had to log in first to get cookie information. @MariuszS answer was useful, but the only problem was that I was not sure what the expected Map / Key-Value-Pair pairs should have been. Thanks to Javascript, I quickly got the keys and values ββof the form and was able to successfully log in. Here's the javascript:
var str = ""; //the form selector ie //that which is to be submitted to. In //my case, i needed to submit the entire body var arr = $("input[name]"); for(var i = 0, l = arr.length; i<l; i++){ str+= '.data("'+ arr[i].name +'", "'+ arr[i].value +'")' }
Add the value of "str" ββto your Jsoup request before
.method(Connection.Method.GET) .execute();
Hope this proves somewhat useful as it was for me :)
source share