Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. import java.io.IOException;  
  2. import org.jsoup.Jsoup;  
  3. import org.jsoup.nodes.*;
  4. import org.jsoup.select.*;
  5.  
  6.  
  7. public class WebScrape{
  8.  
  9.     public static void main( String[] args ) throws IOException{  
  10.                 Document doc = Jsoup.connect("http://www.student.is/afslaettir").get();  
  11.                 String title = doc.title();  
  12.                 System.out.println("title is: " + title);  
  13.  
  14.                 Elements test = doc.select("div.field-content");
  15.                 //String ttt = test.text();
  16.                 System.out.println(test);
  17.  
  18.     }  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement