Create Operator or Output with Groovy


My Problem is quite simple:
I want to load a Webpage with Groovy in a Text-Operator (i.e. Document) and then extract certain attributes (e.g. all-Texts).
Now I can fetch the HTML from a page with
Can somebody give me a hint?
I want to load a Webpage with Groovy in a Text-Operator (i.e. Document) and then extract certain attributes (e.g. all
Now I can fetch the HTML from a page with
But the Script Operator does not return anything to the output, even when I use the "return" from Groovy.
"http://rapid-i.com".toURL().text
Can somebody give me a hint?
Tagged:
0
Answers
... and "no", I do not know which one and how :-\.
I think you were getting nothing back because you were being re-directed, the following ( with the '/' on the end of the URL ) produces words of infinite beauty, wisdom, etc..etc..
But@haddock:
Even if I try your setting, the log tells me that there is nothing delivered to the Result 1 Port.
And if you like you can also take another page where you aren't redirected.
So the problem is still how to get the fetched result to the the output-port, with a data type that is known by RM.
Maybe then the question must be, how can I create an IOObject with a String/Text Attribute in Groovy (as Steffen suggest)?
This goes into the right direction, for what I looked. After a few modifications I found the way how to do it. So I just used the scripting Operator to define the macro and used the macro as parameter for the "Create Document" Operator. This is a nice solution I think.
Now there will be the next step, how to find all the "