Search code examples
urlgroovyhtmldump

Connect to URL and dump webpage in Groovy


I would like to open a webpage from groovy, dump the specified webpage and eventually dump the webpage behind an anchor tag.

Does anybody has some sample code for this?


Solution

  • This is a good example

    http://docs.codehaus.org/display/GROOVY/Simple+file+download+from+URL

    Basically you want to do something like

    def data = new URL(feedUrl).getText()