How to quickly get html meta tags of a page ?
Here you can grab a short example of how to crawl html meta tags of a page.
import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; def url = "http://wordpress.com"; def document = Jsoup.connect(url).get(); def metaTags = document.getElementsByTag("meta"); for (Element metaTag: metaTags) { def tagName = metaTag.attr("name") def tagProperty = metaTag.attr("property") def tagContent = metaTag.attr("content") println String.format("Name: %s, property : %s, content : %s", tagName, tagProperty, tagContent); }