views:

67

answers:

0

I am curious if there are any libraries in Java (or perhaps web services that I can call) out there that previews links like it is done in Facebook.

Right now what I am doing is reading the URL using a new URL([url here]) and parsing the html to get to the content I want to print. This means removing unwanted tags and all.

But this is really too crude as it gets site specific.

Like in wordpress I'd have to read all the content under the <div class="post"></div> segment. In blogger it might be different and what of other sites around the world that serve only static text?

Is there a better solution?