-
-
Save wolfwoodbrbu/2289764 to your computer and use it in GitHub Desktop.
Get's the newest hash of the current CraftBukkit build.
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
#!/usr/bin/python | |
import urllib | |
import re | |
page = urllib.urlopen('http://dl.bukkit.org/downloads/craftbukkit/list/rb/').read() | |
re1='.*?' # Non-greedy match on filler | |
re2='(MD5)' # Variable Name 1 | |
re3='.*?' # Non-greedy match on filler | |
re4='(Checksum)' # Variable Name 2 | |
re5='.*?' # Non-greedy match on filler | |
re6='((?:[a-z0-9]{32}))' # Alphanum 1 | |
rg = re.compile(re1+re2+re3+re4+re5+re6,re.IGNORECASE|re.DOTALL) | |
m = rg.search(page) | |
if m: | |
alphanum1=m.group(3) | |
print alphanum1+"\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment