在 Groovy 中连接到 URL 并转储网页 [英] Connect to URL and dump webpage in Groovy
本文介绍了在 Groovy 中连接到 URL 并转储网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从 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?
推荐答案
这是一个很好的例子
http://docs.codehaus.org/display/GROOVY/简单+文件+下载+从+网址
基本上你想做类似的事情
Basically you want to do something like
def data = new URL(feedUrl).getText()
这篇关于在 Groovy 中连接到 URL 并转储网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文