View ala Facebook links

I'm curious if Java (or perhaps web services that I can call) have libraries that look at links like this, like Facebook does.

I am currently reading the url with new URL([url here]

) and parsing the html to access the content I want to print. This means removing unnecessary tags and all.

But this is really too harsh as it becomes site specific.

As with Wordpress, I will need to read all content in a segment <div class="post"></div>

. In a blogger it might be different, but what about other sites around the world that only serve static text?

Is there a better solution?

+2


source to share


1 answer


In most cases, you should check the tag meta

:

<meta name="description" content="here is some description"/>

      



I think this one might be helpful.

+1


source







All Articles