Connect to URL and dump webpage in Groovy

前端 未结 2 650
自闭症患者
自闭症患者 2020-12-09 01:00

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 t

2条回答
  •  遥遥无期
    2020-12-09 01:45

    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()
    

提交回复
热议问题