Reputation: 1
I am trying to extract product name information from Google Shopping (http://www.google.co.uk/m/products?q=5010459007289, phone website).
The product name always appear in between the span with class "owb63p",for example
"<span class="owb63p">Highland Spring Sports Bottle 750 Ml</span>"
I am new with JSoup, I can connect with the URL and get the whole document, but I just need help setting it up so that I only get the piece of information I need.
Upvotes: 0
Views: 488
Reputation: 584
You could try
doc.select("span").get(0).data();
or you can simply iterate for multiple span tags...
Upvotes: 0
Reputation: 2273
In JSoup it will be like:
Document doc = Jsoup.connect("www.google.co.uk/m/products?q=5010459007289").get();
Element title = doc.select("span.owb63p").first();
System.out.println(title.text());
Upvotes: 1