Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package demmonic.hf;
- import java.io.IOException;
- import org.jsoup.Connection;
- import org.jsoup.Jsoup;
- import org.jsoup.nodes.Document;
- import org.jsoup.nodes.Element;
- import org.jsoup.select.Elements;
- /**
- *
- * @author Demmonic
- *
- */
- public final class Entry {
- private Entry() { }
- public static void main(String[] args) throws IOException {
- String link = "http://www.bloomberg.com/quote/UKX:IND/members";
- Connection con = Jsoup.connect(link);
- Document doc = con.get();
- Elements entries = doc.select(".odd");
- for (Element e : entries) {
- Elements nameChildren = e.select("[class=first name]");
- Element nameChild = nameChildren.first();
- String name = nameChild.text();
- if (name.equals("3i Group PLC")) {
- System.out.println(e.select(".value").first().text());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment