check where they are to vote. However, it can be
used as ID certification as well.
# nnnn is the id to be checked http://www.dopa.go.th/cgi-bin/inqelect.sh?pid=nnnn
Here I make it into a function call.
import urllib, re def getname(id): url = 'http://www.dopa.go.th/cgi-bin/inqelect.sh?pid=' + str(id) src = urllib.urlopen(url).read() pat = '<H3> *(.*?) *<' name = re.findall(pat, src)[0] # don't use other info return name print getname(5100900050063) # show a name (one of my relatives)