Skip to content

Instantly share code, notes, and snippets.

@amscotti
Created August 20, 2017 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amscotti/e5aaacef6d738078c65201a94fe7cfb4 to your computer and use it in GitHub Desktop.
Save amscotti/e5aaacef6d738078c65201a94fe7cfb4 to your computer and use it in GitHub Desktop.
listofemails = new File("email_list.txt").text
listofemails.eachLine { it ->
def respons = new XmlSlurper().parseText(new URL("http://www.stopforumspam.com/api?email=${it}").text)
if (respons.appears.text() == "yes") {
println "${it} has been reported ${respons.frequency.text()} times on stopforumspam.com"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment