def downloadSingleType(bigCate,smallCate,baseDir):
"""
??????????????????????????????????????????
:param bigCate: ????
:param smallCate: ????
:param baseDir: ????
:return: None
"""
global smallCateURL, downloadDir, queue, logFile
smallCateURL = 'http://dict.qq.pinyin.cn/dict_list?sort1=%s&sort2=%s' %(urllib2.quote(bigCate), urllib2.quote(smallCate)) # url??
if baseDir[-1] == '/':
print '?? '+baseDir+' ?????/'
return
downloadDir = baseDir+'/'+bigCate+'/'+smallCate
logFile = baseDir+'/download.log'
if not os.path.exists(downloadDir.decode('utf8')): # ????????????
os.makedirs(downloadDir.decode('utf8'))
queue.put(smallCateURL)
评论列表
文章目录