#anthor jiqunpeng
#time 20121124
import urllib
import re
def getHtml(url): #从URL中读取html内容
page = urllib.urlopen(url)
html = page.read()
page.close()
return html
def getDictionary(html): #匹配成语
reg = "(.*?)"
dicList = re.compile(reg).findall(html)
return dicList
def getItemSite():#手工把每个字母开头的页面数统计下来
itemSite = {}#申明为空字典
itemSite["A"] = 3
itemSite["B"] = 21
itemSite["C"] = 19
itemSite["D"] = 18
itemSite["E"] = 2
itemSite["F"] = 14
itemSite["G"] = 13
itemSite["H"] = 15
itemSite["J"] = 23
itemSite["K"] = 6
itemSite["L"] = 15
itemSite["M"] = 12
itemSi