Files
  • Main.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.util.file
class Main {
    public static void main(String[] args) {
        File input = new File("input.html");
        Document doc = Jsoup.parse(input, "UTF-8", "http://example.com/");

        Element content = doc.getElementById("content");
        Elements links = content.getElementsByTag("a");
        for (Element link : links) {
            String linkHref = link.attr("title");
            String linkText = link.text();
        }
    }
}