Answer the question
In order to leave comments, you need to log in
How to pass cookies to Jsoup?
There is a certain site viewed in webview, in onPageFinished using CookieManager I was able to take cookies and pass them to String. Now I want to parse this same site using Jsoup and store it in a document so I can pull elements later. How to pass this String( i.e. cookie) to session Document doc = Jsoup.connect("Url").get(); , since Jsoup does not use cookies from the webview, but uses its own pure session.
webView.setWebViewClient(new WebViewClient(){
@Override
public void onPageFinished(WebView view, String url) {
String cookies = CookieManager.getInstance().getCookie(url);
Log.d("cookies", "куки : " + cookies);
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question