Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Grab('org.jsoup:jsoup')
- def page = org.jsoup.Jsoup
- .connect('http://www.filebot.net')
- .get()
- def links = page.select("A")
- .collect{ [text: it.text(), link: it.attr('href')] }
- .findAll{ it.text.length() > 0 && new URI(it.link).absolute }
- .sort{ it.text.toLowerCase() }
- .unique{ it.text.toLowerCase() }
- links*.values()*.join(' -> ').join('\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement