def get_yesterday_price(self, stock_code):
"""
??????????
:param stock_code:
:return:
"""
code = self._code_to_symbol(stock_code)
data = urllib.urlopen("http://hq.sinajs.cn/list=" + code).read().decode('gb2312')
stockInfo = data.split(',')
currentPrice = string.atof(stockInfo[2])
return float(currentPrice)
评论列表
文章目录