Skip to content

Instantly share code, notes, and snippets.

@seymores
Last active December 19, 2015 02:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seymores/5882270 to your computer and use it in GitHub Desktop.
Save seymores/5882270 to your computer and use it in GitHub Desktop.
Groovy script to get haza data from apims.doe.gov.my.
import org.jsoup.*
String URL = "http://apims.doe.gov.my/apims/hourly2.php"
def doc = Jsoup.connect(URL).get();
def result = doc.select("table.table1 tr");
result.each { tr ->
def row = tr.select("td")
println " ---- row---\n" + row[0].text() + " " + row[1].text()
}
println "---"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment