def getMostValueableStockList(self):
'''????????'''
page = 1
cList = []
while True:
res = getHtmlFromUrl(mostValueableStockUrl % page)
if res:page += 1
companyListObj = getJsonObj(res)
if companyListObj:
list = companyListObj['Results']
if list and len(list):
for item in list:
stockInfo = item.split(',')
jzcsyl = str(float(stockInfo[5].split('(')[0]) * 100) + '%'
fhlrzzl = str(float(stockInfo[3].split('(')[0]) * 100) + '%'
orgCount = stockInfo[4].split('(')[0]
sz = str(int(float(stockInfo[6])/10000/10000))
cinfo = MostValueableCompanyInfo(stockInfo[1],stockInfo[2],jzcsyl,fhlrzzl,orgCount,sz)
cList.append(cinfo)
if len(list) < pageSize:break
#???????????????????????
if int(companyListObj['PageCount']) < page:break
else:break
else:break
return cList
评论列表
文章目录