I need to scrape the content behind a page that has a http basic authentication. Also, the site has has ssl. What i wrote so far:
Document document = Jsoup.connect("https://someuser:somepassword@somedomain.com").get();
But it doesn't work. Also tried:
Document document = Jsoup
.connect("https://somedomain.com").get();
.header("Authorization", "Basic " + base64login)
.get();
Where base64login is:
private String title;
String username = "someuser";
String password = "somepass";
String login = username + ":" + password;
public String base64login = Base64.encodeToString(login.getBytes(), Base64.DEFAULT);
I don't know how to get it working. Can somebody help me?