Skip to content

Instantly share code, notes, and snippets.

@nazt
Created April 24, 2010 15:40
Show Gist options
  • Save nazt/377721 to your computer and use it in GitHub Desktop.
Save nazt/377721 to your computer and use it in GitHub Desktop.
def nekoParser = new org.cyberneko.html.parsers.SAXParser()
nekoParser.setFeature('http://xml.org/sax/features/namespaces', false)
nekoParser.setFeature('http://cyberneko.org/html/features/scanner/ignore-specified-charset', true)
nekoParser.setProperty('http://cyberneko.org/html/properties/default-encoding',"TIS-620")
url="http://view.gprocurement.go.th/01_procure_egp/index.php?page=1"
page = new XmlSlurper(nekoParser).parse(url)
links = page.depthFirst().grep{ it.name() == 'A' && [email protected]().contains("id") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment