def getWeekKLineForCode(self,code):
dataList = []
url = weekKLineUrl % (code + getMarketId(code))
res = getHtmlFromUrl(url)
if not res:return None
obj = getJsonObj6(res)
if not obj:return None
priceList = obj['data']
for data in priceList:
dList = data.split(',')
if len(dList) < 8:continue
d = CompanyKLineDetailDataList(dList[0],dList[1],dList[2],dList[3],dList[4],dList[5],dList[6],dList[7])
dataList.append(d)
detail = CompanyKLineDataDetail(obj['code'],obj['name'],dataList)
return detail
评论列表
文章目录