We would like to know how to select html tag by tag name and class.
// w w w. j av a 2s. c o m import org.jsoup.Jsoup; import org.jsoup.nodes.Document; public class Main { public static void main(String[] args) throws Exception { String URL = "http://www.your server.com"; Document doc = Jsoup.connect(URL).get(); String cheapest = doc.select("b.item-price").first().text(); System.out.println(cheapest); } }