Created
September 25, 2015 09:24
-
-
Save petermd/4b4b727956f2306dc02b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.MessageDigest | |
def md5(String s) { | |
MessageDigest digest = MessageDigest.getInstance("MD5") | |
digest.update(s.bytes); | |
new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0') | |
} | |
def check(p) { | |
try { | |
def url=("https://www.intercom.io/"+p).toURL() | |
def html=url.text | |
println "\nfetch(${url})="+md5(html) | |
} | |
catch(Exception e) { | |
print "x" | |
} | |
} | |
new File("emoji.csv").eachLine { l -> | |
def r=l.split(",") | |
check(r[1].replace("\\x","%")) | |
// Play nice | |
Thread.sleep(1000) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment