The problem is this line:
Rule r = new Rule("select(div#unten div h2).get(1)")
When you isolate the rule, you get this program:
select(div#unten div h2).get(1)
I think you want to pass a string argument to select
, so this would be the correct program:
select("div#unten div h2").get(1)
This means the Rule r
line should be written as follows:
Rule r = new Rule("select(\"div#unten div h2\").get(1)")