Reputation: 29
I need to extract date from a page, for example:
<div class="update" style="width: 1037px;">
Last update:
<span id="last_update">6.30.2011</span>
</div>
I want to retrieve the date (6.30.2011, in the above example). I have jsoup: Java HTML Parser.
Upvotes: 0
Views: 1132
Reputation: 545518
Using jSoup it’s as easy as
Element result = doc.select("#last_update").first();
String date = result.text();
Upvotes: 2