Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Groovy + Jsoup
@Grab('org.jsoup:jsoup:1.7.1')
def doc = org.jsoup.Jsoup.connect("https://news.google.com/nwshp?hl=zh-TW&tab=wn").get()
doc.select("#s_POPULAR .titletext").each {
node->
println "title=${node.text()}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.