Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.IOException;
- import org.jsoup.Jsoup;
- import org.jsoup.nodes.Document;
- import org.jsoup.nodes.Element;
- import org.jsoup.select.Elements;
- public class Init {
- public static void main(String[] args) {
- Document doc;
- try {
- // need http protocol
- doc = Jsoup.connect("http://stpp.sumy.ua/index.php?do=zamena").get();
- // get page title
- String title = doc.title();
- System.out.println("title : " + title);
- // get all links
- Elements pre = doc.select("pre");
- System.out.println(pre.toString());
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement