I would like to use java to get the source of a website (secure) and then parse that website for links that are in it. I have found how to connect to that url, but then how
Try using the jsoup library.
import java.io.IOException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
public class ParseHTML {
public static void main(String args[]) throws IOException{
Document doc = Jsoup.connect("https://www.wikipedia.org/").get();
String text = doc.body().text();
System.out.print(text);
}
}
You can download the jsoup library here.