stock
import requests
class Details(object):
def __init__(self):
pass
def get(self,code):
url="http://qt.gtimg.cn/q=%s"%code
result=requests.get(url)
details=result.text.split('"')[1].split("~")
# 未知、名字、代码、当前价格、昨收、今开、成交量(手)、外盘、内盘、 =买一、买一量(手)、买二
# 买五、卖一、卖一量、卖二
# 卖五、最近逐笔成交、时间、涨跌、涨跌 %、最高、最低、价格 / 成交量(手) / 成交额
# 成交量(手)、成交额(万)、换手率、市盈率、最高、最低、振幅、流通市值、总市值、市净率、涨停价、跌停价
# ['v_sz000858="51', '五 粮 液', '000858', '86.05', '84.90', '84.55', '287228', '156287', '130735', '86.04', '143',
# '86.03', '220', '86.02', '109', '86.01', '110', '86.00', '786', '86.05', '9', '86.06', '53', '86.07', '42',
# '86.08', '44', '86.09', '49',
# '15:00:04/86.05/3798/S/32681790/10175|14:57:00/85.99/8/B/68786/10079|14:56:57/85.98/44/S/378312/10077|14:56:54/85.97/87/S/748071/10075|14:56:51/85.98/63/B/541662/10073|14:56:48/85.98/69/B/593268/10071',
# '20190322153003', '1.15', '1.35', '86.62', '84.01', '86.05/287228/2459037963', '287228', '245904', '0.76',
# '27.37', '', '86.62', '84.01', '3.07', '3266.26', '3340.12', '5.60', '93.39', '76.41', '0.59', '1171', '85.62',
# '26.38', '34.53']
# 未知、1名字、2代码、3当前价格、4昨收、5今开、6成交量(手)、7外盘、8内盘、
# ['v_sz000858="51', 1'五 粮 液',2 '000858', 3'86.05', 4'84.90', 5'84.55', 6'287228', 7'156287', 8'130735',
#in 9'86.04', 10'143', 11 '86.03', 12'220', 13'86.02',14 '109', 15'86.01', 16'110', 17'86.00', 18'786',
#out 19'86.05', 20'9', 21'86.06', 22'53', 23'86.07',24 '42', 25'86.08', 26'44', 27'86.09', 28'49',
print(details)
if __name__=="__main__":
Details().get("sz000858")
----转载请说明出处并联系作者,否则将会很伤心。----
-----------博主QQ:1226051092---------------------
------http://www.cnblogs.com/Zeech-Lee----------