import re
import urllib
import urllib.request
mailRegex = re.compile("([A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4})", re.IGNORECASE)
mailList = []
for line in urllib.request.urlopen("http://bbs.tianya.cn/m/post-140-393974-6.shtml"):
myList = mailRegex.findall(line.decode("utf-8"))
if myList:
mailList.extend(myList)
print(mailList)