1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
| import json
import os, sys, time import urllib import urllib2 import xlwt,json from operator import itemgetter
update_data = [] down_data = []
t = time.time() now_time = int(round(t * 1000)) now_time = str(now_time)
codes = []
top1000_data = 'var center_list_data={data:["1,603277,N银都,17.81,43.98%","2,000868,安凯客车,5.68,10.08%","2,002897,意华股份,36.04,10.01%","1,603500,祥和实业,30.56,10.01%","2,300681,英搏尔,65.40,10.01%","2,300697,电工合金,13.30,10.01%","2,300693,盛弘股份,63.09,10.01%","1,603305,旭升股份,56.27,10.01%","1,603359,东珠景观,46.39,10.01%","2,300695,兆丰股份,99.26,10.00%","1,603016,新宏泰,38.07,10.00%","2,300141,和顺电气,15.18,10.00%","1,603725,天安新材,18.48,10.00%","1,603127,昭衍新药,51.39,10.00%","1,603183,建研院,28.59,10.00%","2,300699,光威复材,28.71,10.00%","2,300692,中环环保,52.80,10.00%","1,603527,众源新材,23.12,9.99%","2,300698,万马科技,16.84,9.99%","2,002239,奥特佳,4.41,9.98%","2,300242,明家联合,12.14,9.96%","2,000957,中通客车,12.65,8.86%","1,603079,圣达生物,74.10,8.67%","2,002632,道明光学,10.18,8.64%","2,002497,雅化集团,18.86,7.46%","2,002227,奥特迅,23.48,6.97%","2,002594,比亚迪,53.20,6.78%","2,000970,中科三环,19.58,6.59%","1,600558,大西洋,7.21,6.19%","1,600749,西藏旅游,21.15,6.17%","1,600882,广泽股份,10.08,6.11%","2,002828,贝肯能源,27.96,5.79%","2,300491,通合科技,33.17,5.77%","2,002709,天赐材料,52.32,5.74%","2,300685,艾德生物,103.90,5.54%","2,000557,西部创业,6.15,5.49%","2,002276,万马股份,13.06,5.32%","1,600182,S佳通,24.32,5.01%","2,002248,*ST东数,6.76,4.97%","2,000980,众泰汽车,11.89,4.85%","2,002662,京威股份,7.38,4.83%","2,002062,宏润建设,6.15,4.77%","1,600686,金龙汽车,15.60,4.70%","2,300619,金银河,57.87,4.65%","2,002355,兴民智通,11.10,4.42%","2,002192,融捷股份,41.81,4.34%","2,000762,西藏矿业,19.50,4.28%","2,002074,国轩高科,33.36,4.25%","1,600970,中材国际,9.08,4.25%","2,002095,生意宝,44.00,4.24%","1,600405,动力源,8.38,4.23%","2,300450,先导智能,79.50,4.06%","1,600213,亚星客车,11.59,4.04%","2,002056,横店东磁,11.90,4.02%","1,600066,宇通客车,21.96,3.98%","2,300318,博晖创新,7.86,3.97%","1,600499,科达洁能,10.70,3.88%","1,600438,通威股份,8.03,3.88%","1,603197,保隆科技,52.85,3.85%","2,002196,方正电机,13.10,3.80%","1,603859,能科股份,32.07,3.75%","2,002324,普利特,27.48,3.74%","1,601127,小康股份,22.51,3.73%","2,002018,华信国际,7.61,3.68%","2,300153,科泰电源,16.06,3.68%","2,300484,蓝海华腾,29.99,3.56%","1,601238,广汽集团,27.03,3.52%","1,600418,江淮汽车,10.04,3.51%","2,002851,麦格米特,41.25,3.49%","2,000815,美利云,15.20,3.47%","2,300568,星源材质,49.09,3.46%","2,300001,特锐德,16.52,3.44%","1,600884,杉杉股份,24.16,3.42%","2,000612,焦作万方,10.36,3.39%","2,002580,圣阳股份,9.49,3.38%","2,300409,道氏技术,56.86,3.38%","2,000977,浪潮信息,18.75,3.36%","2,002885,京泉华,41.40,3.29%","1,603799,华友钴业,89.10,3.28%","2,002454,松芝股份,15.02,3.23%","2,300526,中潜股份,28.75,3.23%","2,002407,多氟多,26.16,3.20%","2,300048,合康新能,5.17,3.19%","1,600366,宁波韵升,21.21,3.16%","2,300545,联得装备,62.89,3.10%","2,300547,川环科技,62.98,3.08%","2,000792,盐湖股份,13.19,3.05%","2,002249,大洋电机,7.53,3.01%","1,603668,天马科技,15.41,3.01%","2,002850,科达利,85.20,3.00%","2,002091,江苏国泰,10.78,2.96%","1,600773,西藏城投,13.62,2.87%","2,002050,三花智控,17.60,2.86%","1,600006,东风汽车,6.15,2.84%","2,000559,万向钱潮,10.85,2.84%","2,002466,天齐锂业,78.10,2.83%","1,600718,东软集团,18.50,2.83%","2,000408,藏格控股,19.23,2.83%","2,002378,章源钨业,12.80,2.81%","1,600141,兴发集团,21.70,2.79%","2,002441,众业达,12.17,2.79%","2,002078,太阳纸业,9.64,2.77%","2,002518,科士达,16.85,2.74%","2,300116,坚瑞沃能,10.96,2.72%","2,002707,众信旅游,14.40,2.71%","2,002176,江特电机,15.79,2.67%","2,300510,金冠电气,32.80,2.66%","1,600303,曙光股份,11.22,2.65%","2,002789,建艺集团,48.12,2.62%","2,002460,赣锋锂业,95.50,2.62%","1,600680,*ST上普,14.56,2.61%","2,300198,纳川股份,8.80,2.56%","1,603717,天域生态,29.34,2.55%","2,002830,名雕股份,29.10,2.54%","2,300655,晶瑞股份,32.13,2.52%","2,002055,得润电子,24.10,2.51%","2,300457,赢合科技,102.49,2.51%","2,002664,信质电机,28.37,2.49%","2,300037,新宙邦,27.41,2.47%","2,002108,沧州明珠,15.93,2.44%","2,300648,星云股份,67.63,2.41%","2,002364,中恒电气,14.63,2.31%","2,300444,双杰电气,22.20,2.30%","1,600176,中国巨石,10.36,2.27%","2,300014,亿纬锂能,26.66,2.26%","2,002819,东方中科,32.82,2.24%","1,603636,南威软件,13.30,2.23%","2,300562,乐心医疗,27.20,2.22%","2,002291,星期六,10.63,2.21%","1,600580,卧龙电气,7.94,2.19%","1,603036,如通股份,25.12,2.16%","1,603600,永艺股份,17.86,2.12%","1,600449,宁夏建材,12.69,2.09%","2,300386,飞天诚信,20.10,2.08%","1,603229,奥翔药业,19.67,2.08%","2,300502,新易盛,29.23,2.06%","2,002611,东方精工,13.90,2.06%","2,300228,富瑞特装,12.52,2.04%","2,300097,智云股份,31.18,2.03%","2,300040,九洲电气,11.59,2.02%","2,002782,可立克,19.34,2.00%","1,601311,骆驼股份,15.83,2.00%","2,002660,茂硕电源,10.71,2.00%","2,300438,鹏辉能源,33.45,1.98%","1,600127,金健米业,5.67,1.98%","1,603026,石大胜华,34.66,1.97%","2,002845,同兴达,87.55,1.97%","1,600683,京投发展,7.86,1.95%","2,000796,凯撒旅游,16.70,1.95%","2,300635,达安股份,48.98,1.91%","2,000697,炼石有色,27.39,1.90%","2,000567,海德股份,27.50,1.89%","2,300582,英飞特,20.08,1.88%","1,603227,雪峰科技,7.10,1.87%","1,600804,鹏博士,18.66,1.86%","2,300224,正海磁材,14.75,1.86%","2,000005,世纪星源,5.49,1.86%","2,300325,德威新材,6.06,1.85%","2,300477,合纵科技,24.81,1.85%","1,600699,均胜电子,32.65,1.84%","2,300151,昌红科技,10.59,1.83%","2,300696,爱乐达,77.89,1.83%","1,603797,联泰环保,19.00,1.82%","1,600110,诺德股份,14.02,1.82%","1,603767,中马传动,19.54,1.82%","2,002089,新海宜,6.71,1.82%","2,002358,森源电气,15.80,1.80%","2,002334,英威腾,8.49,1.80%","2,002424,贵州百灵,17.08,1.79%","1,601952,苏垦农发,13.72,1.78%","1,603611,诺力股份,24.90,1.76%","2,002770,科迪乳业,5.79,1.76%","2,002240,威华股份,18.11,1.74%","1,600166,福田汽车,2.94,1.73%","1,600297,广汇汽车,8.32,1.71%","2,300686,智动力,32.34,1.70%","1,603050,科林电气,37.10,1.70%","2,002190,成飞集成,26.96,1.70%","2,002590,万安科技,15.69,1.69%","2,002121,科陆电子,10.27,1.68%","1,603909,合诚股份,34.69,1.64%","1,600885,宏发股份,41.60,1.64%","2,300134,大富科技,18.78,1.62%","2,300521,爱司凯,41.21,1.60%","1,601777,力帆股份,8.28,1.60%","2,002777,久远银海,82.68,1.60%","2,002892,科力尔,54.33,1.59%","2,300571,平治信息,149.33,1.59%","2,300396,迪瑞医疗,36.99,1.57%","2,002157,正邦科技,5.85,1.56%","1,600386,北巴传媒,6.53,1.56%","2,002533,金杯电工,7.92,1.54%","1,600056,中国医药,23.95,1.53%","1,603021,山东华鹏,11.94,1.53%","1,600798,宁波海运,6.05,1.51%","2,002675,东诚药业,12.78,1.51%","2,002774,快意电梯,14.22,1.50%","1,601326,秦港股份,10.94,1.48%","1,600563,法拉电子,57.59,1.46%","1,603158,腾龙股份,20.18,1.46%","2,300575,中旗股份,59.81,1.46%","1,600192,长城电工,8.39,1.45%","2,300408,三环集团,22.44,1.45%","2,000069,华侨城A,9.25,1.43%","2,000969,安泰科技,10.64,1.43%","1,600268,国电南自,6.45,1.42%","2,002805,丰元股份,38.96,1.41%","2,002681,奋达科技,13.71,1.41%","2,000877,天山股份,12.96,1.41%","2,300649,杭州园林,99.99,1.41%","2,300670,大烨智能,28.40,1.39%","2,002637,赞宇科技,11.79,1.38%","2,300691,联合光电,73.70,1.38%","1,601882,海天精工,17.00,1.37%","2,002759,天际股份,29.50,1.37%","1,600742,一汽富维,22.40,1.36%","2,002057,中钢天源,16.39,1.36%","2,002761,多喜爱,35.90,1.36%","2,002274,华昌化工,8.20,1.36%","2,002790,瑞尔特,32.99,1.35%","1,600598,北大荒,11.36,1.34%","1,603579,荣泰健康,124.00,1.34%","1,603388,元成股份,55.64,1.33%","2,002685,华东重机,11.47,1.33%","2,300073,当升科技,33.62,1.33%","2,300120,经纬电材,13.80,1.32%","2,002272,川润股份,6.99,1.30%","2,300161,华中数控,18.67,1.30%","2,300423,鲁亿通,28.02,1.30%","2,300412,迦南科技,13.30,1.29%","2,002615,哈尔斯,10.21,1.29%","2,002088,鲁阳节能,13.40,1.28%","2,002802,洪汇新材,41.50,1.27%","2,002284,亚太股份,11.18,1.27%","2,002370,亚太药业,33.70,1.26%","2,002273,水晶光电,26.55,1.26%","1,600232,金鹰股份,8.86,1.26%","2,002771,真视通,28.88,1.26%","1,603667,五洲新春,24.18,1.26%","1,600599,熊猫金控,23.28,1.26%","1,600400,红豆股份,7.24,1.26%","2,000413,东旭光电,10.50,1.25%","1,600114,东睦股份,17.33,1.23%","2,300281,金明精机,14.98,1.22%","2,000400,许继电气,17.50,1.21%","2,002301,齐心集团,18.45,1.21%","2,002888,惠威科技,33.40,1.21%","2,300337,银邦股份,10.96,1.20%","1,600525,长园集团,20.20,1.20%","2,002101,广东鸿图,24.65,1.19%","1,603315,福鞍股份,18.66,1.19%","2,300542,新晨科技,34.77,1.19%","2,300435,中泰股份,14.53,1.18%","1,600460,士兰微,6.91,1.17%","1,600398,海澜之家,10.34,1.17%","1,600067,冠城大通,7.75,1.17%","2,300274,阳光电源,13.00,1.17%","2,000088,盐田港,9.57,1.16%","2,300432,富临精工,25.32,1.16%","2,000049,德赛电池,56.40,1.15%","2,300062,中能电气,10.56,1.15%","1,600567,山鹰纸业,5.28,1.15%","1,601155,新城控股,18.46,1.15%","2,300555,路通视信,17.60,1.15%","2,002879,长缆科技,34.27,1.15%","1,600594,益佰制药,14.03,1.15%","1,600869,智慧能源,7.05,1.15%","1,603738,泰晶科技,31.97,1.14%","1,600572,康恩贝,7.07,1.14%","2,300031,宝通科技,17.78,1.14%","1,603535,嘉诚国际,31.94,1.14%","1,600720,祁连山,10.78,1.13%","2,300599,雄塑科技,16.20,1.12%","2,002387,黑牛食品,17.16,1.12%","2,000833,贵糖股份,8.18,1.11%","2,300532,今天国际,31.75,1.11%","1,600406,国电南瑞,16.61,1.10%","1,603518,维格娜丝,25.64,1.10%","2,300365,恒华科技,37.00,1.09%","2,002639,雪人股份,9.27,1.09%","2,002340,格林美,7.48,1.08%","2,000733,振华科技,16.83,1.08%","2,300682,朗新科技,26.56,1.07%","1,601799,星宇股份,48.29,1.07%","1,600076,康欣新材,10.39,1.07%","2,002245,澳洋顺昌,9.52,1.06%","2,002285,世联行,11.59,1.05%","1,600704,物产中大,7.78,1.04%","2,300652,雷迪克,30.45,1.03%","2,000572,海马汽车,4.96,1.02%","1,600512,腾达建设,4.97,1.02%","1,603129,春风动力,39.78,1.02%","2,000488,晨鸣纸业,17.03,1.01%","2,300130,新国都,19.97,1.01%","2,002235,安妮股份,13.06,1.01%","2,000639,西王食品,21.22,1.00%","1,600609,金杯汽车,6.09,1.00%","2,002135,东南网架,9.13,1.00%","2,000802,北京文化,17.14,1.00%","2,002148,北纬科技,12.07,1.00%","2,002723,金莱特,21.21,1.00%","1,600502,安徽水利,8.08,1.00%","1,603676,卫信康,18.43,0.99%","1,601500,通用股份,13.29,0.99%","2,300528,幸福蓝海,17.29,0.99%","1,600601,方正科技,4.08,0.99%","1,600421,仰帆控股,15.53,0.98%","2,300539,横河模具,14.39,0.98%","2,002544,杰赛科技,21.64,0.98%","2,300565,科信技术,22.95,0.97%","2,300553,集智股份,52.30,0.97%","1,603159,上海亚虹,33.80,0.96%","2,000905,厦门港务,14.76,0.96%","2,300426,唐德影视,24.20,0.96%","1,603630,拉芳家化,32.86,0.95%","1,603933,睿能科技,53.30,0.95%","2,002686,亿利达,12.70,0.95%","2,002268,卫士通,20.20,0.95%","2,000028,国药一致,67.80,0.94%","2,300096,易联众,15.04,0.94%","2,002335,科华恒盛,39.80,0.94%","2,002824,和胜股份,24.76,0.94%","2,300019,硅宝科技,9.63,0.94%","2,002552,宝鼎科技,11.91,0.93%","2,300581,晨曦航空,39.19,0.93%","1,600763,通策医疗,24.98,0.93%","2,002371,北方华创,27.00,0.93%","2,002180,纳思达,27.10,0.93%","2,300225,金力泰,14.18,0.93%","2,000925,众合科技,18.62,0.92%","2,002630,华西能源,10.95,0.92%","1,600585,海螺水泥,23.35,0.91%","1,600359,新农开发,7.78,0.91%","1,600712,南宁百货,8.87,0.91%","1,603788,宁波高发,41.09,0.91%","2,002700,新疆浩源,11.08,0.91%","1,600063,皖维高新,4.46,0.90%","1,603955,大千生态,42.60,0.90%","2,000673,当代东方,13.50,0.90%","1,600671,天目药业,25.71,0.90%","2,002556,辉隆股份,7.83,0.90%","1,600241,时代万恒,12.36,0.90%","2,002178,延华智能,11.27,0.90%","2,002543,万和电气,20.47,0.89%","2,300124,汇川技术,28.27,0.89%","2,002529,海源机械,18.04,0.89%","2,300687,赛意信息,55.89,0.88%","1,603823,百合花,20.75,0.88%","2,002281,光迅科技,23.00,0.88%","2,300370,安控科技,4.60,0.88%","2,000671,阳光城,6.89,0.88%","2,300400,劲拓股份,16.30,0.87%","2,000526,*ST紫学,34.90,0.87%","2,300679,电连技术,126.03,0.87%","1,603515,欧普照明,40.49,0.87%","2,300298,三诺生物,21.06,0.86%","1,600108,亚盛集团,4.68,0.86%","2,002796,世嘉科技,39.80,0.86%","2,300146,汤臣倍健,14.05,0.86%","1,603637,镇海股份,23.40,0.86%","2,300618,寒锐钴业,173.48,0.86%","2,000887,中鼎股份,20.25,0.85%","2,300416,苏试试验,26.00,0.85%","1,600319,亚星化学,10.80,0.84%","2,002738,中矿资源,25.11,0.84%","2,300587,天铁股份,26.27,0.84%","2,300121,阳谷华泰,16.72,0.84%","1,600335,国机汽车,13.13,0.84%","2,002841,视源股份,72.80,0.83%","1,600548,深高速,9.72,0.83%","2,300651,金陵体育,31.60,0.83%","2,000915,山大华特,32.95,0.83%","2,002298,中电鑫龙,10.90,0.83%","2,300419,浩丰科技,12.34,0.82%","1,603179,新泉股份,45.37,0.82%","2,300188,美亚柏科,18.50,0.82%","2,300641,正丹股份,18.34,0.82%","1,600308,华泰股份,7.34,0.82%","2,300458,全志科技,31.80,0.82%","1,603022,新通联,16.06,0.82%","2,002414,高德红外,19.68,0.82%","2,000819,岳阳兴长,18.45,0.82%","2,002882,金龙羽,17.19,0.82%","1,601888,中国国旅,32.45,0.81%","2,002385,大北农,6.23,0.81%","2,000665,湖北广电,12.40,0.81%","2,002656,摩登大道,18.96,0.80%","1,600355,精伦电子,8.85,0.80%","1,603787,新日股份,16.30,0.80%","2,000966,长源电力,5.01,0.80%","2,300643,万通智控,16.44,0.80%","2,300667,必创科技,44.17,0.80%","2,300127,银河磁体,22.56,0.80%","2,002434,万里扬,13.95,0.79%","2,300630,普利制药,50.90,0.79%","2,000961,中南建设,6.34,0.79%","2,300441,鲍斯股份,21.88,0.78%","2,300410,正业科技,39.84,0.78%","2,300420,五洋科技,9.00,0.78%","2,000001,平安银行,11.58,0.78%","2,000998,隆平高科,23.64,0.77%","1,603993,洛阳钼业,7.83,0.77%","1,603855,华荣股份,14.62,0.76%","2,300560,中富通,58.19,0.76%","1,603309,维力医疗,19.88,0.76%","2,000913,钱江摩托,17.24,0.76%","1,603776,永安行,76.70,0.76%","2,000513,丽珠集团,48.83,0.76%","1,600738,兰州民百,9.25,0.76%","1,603165,荣晟环保,61.98,0.76%","1,600172,黄河旋风,8.06,0.75%","1,603330,上海天洋,41.70,0.75%","2,300601,康泰生物,33.50,0.75%","2,300087,荃银高科,10.76,0.75%","2,002067,景兴纸业,6.74,0.75%","2,300317,珈伟股份,17.45,0.75%","2,000777,中核科技,17.63,0.74%","2,000407,胜利股份,8.21,0.74%","1,603203,快克股份,39.74,0.74%","1,603117,万林股份,12.29,0.74%","2,300422,博世科,19.04,0.74%","2,300042,朗科科技,39.30,0.74%","1,600148,长春一东,31.79,0.73%","2,300566,激智科技,34.45,0.73%","2,300518,盛讯达,67.96,0.73%","1,601811,新华文轩,15.15,0.73%","1,603998,方盛制药,13.81,0.73%","2,000520,长航凤凰,5.52,0.73%","2,002706,良信电器,12.53,0.72%","1,600703,三安光电,20.93,0.72%","1,603398,邦宝益智,20.84,0.72%","1,600771,广誉远,37.00,0.71%","1,603286,日盈电子,31.40,0.71%","1,603601,再升科技,15.53,0.71%","1,603238,诺邦股份,31.06,0.71%","2,000584,哈工智能,14.30,0.70%","1,603331,百达精工,23.07,0.70%","1,600621,华鑫股份,13.01,0.70%","2,002768,国恩股份,24.35,0.70%","1,600081,东风科技,13.00,0.70%","2,002366,台海核电,28.90,0.70%","2,002484,江海股份,10.04,0.70%","1,603456,九洲药业,17.17,0.70%","1,603416,信捷电气,35.93,0.70%","1,600459,贵研铂业,25.86,0.70%","2,300090,盛运环保,10.25,0.69%","2,002063,远光软件,11.66,0.69%","2,300593,新雷能,24.78,0.69%","1,600235,民丰特纸,8.85,0.68%","2,300608,思特奇,34.24,0.68%","2,002514,宝馨科技,8.82,0.68%","1,601390,中国中铁,8.89,0.68%","2,300227,光韵达,25.25,0.68%","1,600321,国栋建设,4.44,0.68%","1,603997,继峰股份,13.47,0.67%","2,300101,振芯科技,15.00,0.67%","2,300144,宋城演艺,19.43,0.67%","2,000524,岭南控股,13.73,0.66%","1,603089,正裕工业,32.11,0.66%","1,603906,龙蟠科技,19.90,0.66%","2,300611,美力科技,19.80,0.66%","2,002871,伟隆股份,41.12,0.66%","2,002872,天圣制药,35.18,0.66%","2,002809,红墙股份,40.17,0.65%","2,000422,湖北宜化,6.19,0.65%","2,002436,兴森科技,6.24,0.65%","1,601689,拓普集团,29.46,0.65%","1,603919,金徽酒,20.12,0.65%","2,002528,英飞拓,6.24,0.65%","2,002717,岭南园林,27.90,0.65%","1,600576,万家文化,10.80,0.65%","1,603421,鼎信通讯,30.99,0.65%","2,000930,中粮生化,12.53,0.64%","2,300178,腾邦国际,15.69,0.64%","1,603268,松发股份,31.26,0.64%","2,002363,隆基机械,9.50,0.64%","2,002741,光华科技,17.57,0.63%","2,002763,汇洁股份,33.65,0.63%","1,600469,风神股份,7.94,0.63%","2,002008,大族激光,40.25,0.63%","1,600210,紫江企业,6.41,0.63%","2,000632,三木集团,6.38,0.63%","2,002558,巨人网络,43.20,0.63%","2,002218,拓日新能,4.76,0.63%","1,603860,中公高科,42.40,0.62%","2,002308,威创股份,14.52,0.62%","2,300468,四方精创,43.76,0.62%","2,002876,三利谱,64.49,0.62%","1,600401,*ST海润,1.61,0.62%","2,300577,开润股份,51.75,0.62%","1,600756,浪潮软件,21.15,0.62%","1,600516,方大炭素,35.52,0.62%","2,002627,宜昌交运,19.84,0.61%","2,002048,宁波华翔,23.26,0.61%","1,603908,牧高笛,44.63,0.61%","2,300433,蓝思科技,31.30,0.61%","2,000800,一汽轿车,11.49,0.61%","1,600243,青海华鼎,8.31,0.61%","2,002889,东方嘉盛,34.57,0.61%","1,600816,安信信托,13.18,0.61%","2,002213,特尔佳,21.59,0.61%","2,002377,国创高新,9.88,0.61%","1,600036,招商银行,26.54,0.61%","2,002818,富森美,38.29,0.60%","2,002158,汉钟精机,16.66,0.60%","2,300429,强力新材,23.44,0.60%","2,300499,高澜股份,25.25,0.60%","2,000611,天首发展,8.43,0.60%","1,600278,东方创业,13.44,0.60%","1,600774,汉商集团,18.60,0.59%","1,603599,广信股份,17.08,0.59%","1,600895,张江高科,16.99,0.59%","1,603966,法兰泰克,20.49,0.59%","1,603178,圣龙股份,16.93,0.59%","2,002858,力盛赛车,46.33,0.59%","2,300176,鸿特精密,87.61,0.59%","1,603665,康隆达,37.37,0.59%","1,603989,艾华集团,36.53,0.58%","1,603058,永吉股份,20.90,0.58%","1,603985,恒润股份,45.40,0.58%","1,600367,红星发展,13.85,0.58%","1,600690,青岛海尔,13.87,0.58%","2,300585,奥联电子,19.05,0.58%","1,600354,敦煌种业,8.63,0.58%","2,300519,新光药业,26.11,0.58%","2,300207,欣旺达,12.39,0.57%","1,603728,鸣志电器,23.05,0.57%","2,002275,桂林三金,17.79,0.57%","2,300136,信维通信,42.25,0.57%","2,002397,梦洁股份,7.06,0.57%","2,002762,金发拉比,22.89,0.57%","2,002464,金利科技,35.20,0.57%","2,000682,东方电子,5.33,0.57%","2,000767,漳泽电力,3.55,0.57%","1,600156,华升股份,7.03,0.57%","2,002755,东方新星,29.87,0.57%","2,002715,登云股份,33.44,0.57%","2,002609,捷顺科技,15.75,0.57%","1,603968,醋化股份,24.97,0.56%","2,002649,博彦科技,10.87,0.56%","1,600735,新华锦,12.61,0.56%","2,000676,智度股份,14.33,0.56%","2,002113,天润数娱,14.38,0.56%","2,300258,精锻科技,16.24,0.56%","1,603959,百利科技,25.33,0.56%","2,300620,光库科技,37.95,0.56%","1,603538,美诺华,28.48,0.56%","2,300668,杰恩设计,71.49,0.55%","2,300388,国祯环保,19.95,0.55%","2,000597,东北制药,11.06,0.55%","2,002848,高斯贝尔,27.38,0.55%","1,601126,四方股份,9.10,0.55%","1,600305,恒顺醋业,11.04,0.55%","2,002831,裕同科技,69.36,0.54%","2,300627,华测导航,56.36,0.54%","2,300221,银禧科技,14.85,0.54%","2,300217,东方电热,3.72,0.54%","1,600012,皖通高速,12.98,0.54%","1,600455,博通股份,38.78,0.54%","1,600592,龙溪股份,11.19,0.54%","2,002861,瀛通通讯,35.47,0.54%","2,002750,龙津药业,11.08,0.54%","2,002217,合力泰,11.16,0.54%","2,300118,东方日升,13.06,0.54%","1,600098,广州发展,7.58,0.53%","1,603223,恒通股份,24.68,0.53%","2,002476,宝莫股份,7.58,0.53%","2,002007,华兰生物,28.38,0.53%","2,002427,尤夫股份,26.66,0.53%","2,300215,电科院,11.33,0.53%","1,601288,农业银行,3.82,0.53%","2,002028,思源电气,15.09,0.53%","2,000150,宜华健康,27.00,0.52%","1,603303,得邦照明,34.68,0.52%","2,300576,容大感光,23.10,0.52%","2,002444,巨星科技,15.41,0.52%","2,300554,三超新材,60.46,0.52%","2,002446,盛路通信,11.66,0.52%","2,300368,汇金股份,13.48,0.52%","2,300604,长川科技,42.42,0.52%","1,601877,正泰电器,19.50,0.52%","2,002499,科林环保,23.04,0.52%","1,603100,川仪股份,11.63,0.52%","2,300471,厚普股份,17.47,0.52%","2,000993,闽东电力,9.69,0.52%","1,601166,兴业银行,17.54,0.52%","1,603300,华铁科技,11.89,0.51%","2,300196,长海股份,29.46,0.51%","2,002869,金溢科技,39.20,0.51%","2,300262,巴安水务,9.89,0.51%","1,600104,上汽集团,29.37,0.51%","1,601398,工商银行,5.93,0.51%","2,002519,银河电子,7.86,0.51%","2,002585,双星新材,8.03,0.50%","1,600678,四川金顶,12.14,0.50%","2,300068,南都电源,18.12,0.50%","2,002645,华宏科技,20.00,0.50%","2,300430,诚益通,35.88,0.50%","2,002866,传艺科技,30.25,0.50%","2,000711,京蓝科技,14.46,0.49%","2,002595,豪迈科技,20.50,0.49%","2,002703,浙江世宝,12.41,0.49%","2,002092,中泰化学,16.55,0.49%","2,300496,中科创达,41.34,0.49%","1,600230,沧州大化,61.15,0.49%","1,600965,福成股份,12.38,0.49%","1,600287,江苏舜天,8.23,0.49%","1,600383,金地集团,12.32,0.49%","1,603196,日播时尚,14.42,0.49%","2,300660,江苏雷利,77.20,0.49%","2,002435,长江润发,18.69,0.48%","1,603819,神力股份,24.87,0.48%","2,002415,海康威视,33.19,0.48%","1,601818,光大银行,4.17,0.48%","2,300559,佳发安泰,41.82,0.48%","2,000546,金圆股份,12.47,0.48%","2,300473,德尔股份,45.59,0.48%","2,002890,弘宇股份,37.85,0.48%","1,603318,派思股份,14.67,0.48%","2,300533,冰川网络,81.98,0.48%","1,600122,宏图高科,10.45,0.48%","2,002617,露笑科技,14.74,0.48%","1,603536,惠发股份,20.94,0.48%","2,002599,盛通股份,14.61,0.48%","2,300650,太龙照明,36.27,0.47%","1,600593,大连圣亚,25.79,0.47%","1,600578,京能电力,4.28,0.47%","1,603188,亚邦股份,19.13,0.47%","1,600768,宁波富邦,16.98,0.47%","1,600963,岳阳林纸,8.61,0.47%","2,002724,海洋王,12.81,0.47%","1,600138,中青旅,21.53,0.47%","1,600969,郴电国际,15.04,0.47%","1,603025,大豪科技,29.95,0.47%","2,002661,克明面业,14.95,0.47%","1,603007,花王股份,16.98,0.47%","2,002653,海思科,12.93,0.47%","2,300154,瑞凌股份,8.47,0.47%","2,000972,*ST中基,4.26,0.47%","2,300666,江丰电子,35.97,0.47%","1,601619,嘉泽新能,10.72,0.47%","2,000901,航天科技,28.65,0.46%","1,601328,交通银行,6.50,0.46%","2,002242,九阳股份,19.64,0.46%","1,603389,亚振家居,17.54,0.46%","1,600080,金花股份,10.99,0.46%","1,600900,长江电力,15.30,0.46%","1,601177,杭齿前进,8.71,0.46%","2,300229,拓尔思,15.31,0.46%","2,000826,启迪桑德,34.89,0.46%","2,000797,中国武夷,11.02,0.46%","2,002107,沃华医药,12.99,0.46%","2,002682,龙洲股份,13.20,0.46%","2,002391,长青股份,15.53,0.45%","1,600090,同济堂,9.02,0.45%","1,600135,乐凯胶片,15.61,0.45%","1,600310,桂东电力,6.77,0.45%","1,600265,ST景谷,26.94,0.45%","1,600129,太极集团,15.72,0.45%","2,300632,光莆股份,24.55,0.45%","2,002780,三夫户外,28.73,0.45%","2,000550,江铃汽车,20.09,0.45%","2,300218,安利股份,11.04,0.45%","2,002418,康盛股份,8.99,0.45%","1,600617,国新能源,9.11,0.44%","2,002812,创新股份,126.77,0.44%","1,603586,金麒麟,32.05,0.44%","1,600218,全柴动力,9.12,0.44%","2,002069,獐子岛,9.15,0.44%","2,002051,中工国际,20.45,0.44%","1,603617,君禾股份,27.23,0.44%","1,603496,恒为科技,34.46,0.44%","2,300260,新莱应材,13.75,0.44%","1,603789,星光农机,20.37,0.44%","1,600428,中远海特,7.06,0.43%","1,600711,盛屯矿业,9.33,0.43%","1,603458,勘设股份,58.75,0.43%","1,600724,宁波富达,4.70,0.43%","2,000050,深天马A,23.30,0.43%","2,002265,西仪股份,18.72,0.43%","2,300167,迪威视讯,14.00,0.43%","1,603699,纽威股份,16.27,0.43%","1,603866,桃李面包,37.54,0.43%","2,002457,青龙管业,16.41,0.43%","2,300107,建新股份,7.17,0.42%","2,002598,山东章鼓,11.85,0.42%","1,603037,凯众股份,33.78,0.42%","2,300425,环能科技,12.01,0.42%","2,002887,绿茵生态,84.25,0.42%","2,000830,鲁西化工,9.66,0.42%","2,300387,富邦股份,19.14,0.42%","1,600478,科力远,9.51,0.42%","1,600596,新安股份,12.01,0.42%","1,601601,中国太保,38.48,0.42%","2,300639,凯普生物,46.40,0.41%","1,601965,中国汽研,9.86,0.41%","1,600271,航天信息,19.75,0.41%","1,600377,宁沪高速,9.86,0.41%","2,300440,运达科技,14.80,0.41%","1,600466,蓝光发展,9.87,0.41%","1,600258,首旅酒店,29.64,0.41%","2,002540,亚太科技,7.26,0.41%","2,000056,皇庭国际,12.39,0.41%","2,300556,丝路视觉,34.41,0.41%","2,300606,金太阳,31.80,0.41%","1,600737,中粮糖业,9.72,0.41%","2,002027,分众传媒,10.04,0.40%","2,002520,日发精机,10.06,0.40%","2,300159,新研股份,12.50,0.40%","2,000617,中油资本,17.51,0.40%","1,601169,北京银行,7.62,0.40%","1,600446,金证股份,19.97,0.40%","1,600103,青山纸业,5.07,0.40%","2,000502,绿景控股,12.42,0.40%","1,603658,安图生物,48.21,0.40%","1,603368,柳州医药,55.29,0.40%","2,002094,青岛金王,22.41,0.40%","1,600626,申达股份,9.99,0.40%","2,300573,兴齐眼药,32.73,0.40%","1,603345,安井食品,25.17,0.40%","1,600960,渤海活塞,7.59,0.40%","2,300436,广生堂,38.29,0.39%","1,600757,长江传媒,7.81,0.39%","1,603298,杭叉集团,20.55,0.39%","2,300021,大禹节水,7.71,0.39%","1,600602,云赛智联,7.79,0.39%","2,002610,爱康科技,2.59,0.39%","1,600889,南京化纤,10.17,0.39%","2,002634,棒杰股份,7.82,0.39%","2,002174,游族网络,25.69,0.39%","2,300128,锦富技术,10.42,0.39%","1,603208,江山欧派,50.45,0.38%","1,603768,常青股份,23.63,0.38%","1,603938,三孚股份,29.28,0.38%","1,601229,上海银行,18.63,0.38%","2,300525,博思软件,47.00,0.38%","2,002539,云图控股,8.01,0.38%","2,002049,紫光国芯,29.25,0.38%","1,600000,浦发银行,13.08,0.38%","1,601800,中国交建,15.75,0.38%","2,300230,永利股份,16.20,0.37%","2,000333,美的集团,41.14,0.37%","2,000890,法尔胜,8.05,0.37%","1,601009,南京银行,8.15,0.37%","2,000625,长安汽车,13.67,0.37%","2,002785,万里石,19.00,0.37%","2,300549,优德精密,29.72,0.37%","2,002041,登海种业,13.54,0.37%","1,603556,海兴电力,43.60,0.37%","2,002459,天业通联,13.70,0.37%","2,002310,东方园林,19.21,0.37%","2,300204,舒泰神,16.06,0.37%","2,002013,中航机电,10.79,0.37%","2,000498,山东路桥,8.20,0.37%","1,601100,恒立液压,18.92,0.37%","1,601669,中国电建,8.20,0.37%","1,600309,万华化学,40.28,0.37%","1,600152,维科精华,10.91,0.37%","1,600586,金晶科技,5.36,0.37%","2,000590,启迪古汉,16.63,0.36%","2,000801,四川九洲,8.25,0.36%","1,603316,诚邦股份,16.90,0.36%","2,000892,欢瑞世纪,8.29,0.36%","2,002152,广电运通,8.33,0.36%","1,600048,保利地产,11.10,0.36%","2,002735,王子新材,39.50,0.36%","2,002003,伟星股份,11.03,0.36%","1,600730,中国高科,8.42,0.36%","1,603686,龙马环卫,30.33,0.36%","2,002629,仁智股份,8.35,0.36%","1,603898,好莱客,30.90,0.36%","1,600780,通宝能源,5.65,0.36%","2,300157,恒泰艾普,11.10,0.36%","1,603626,科森科技,61.98,0.36%","2,002037,久联发展,14.06,0.36%","1,603883,老百姓,49.99,0.36%","1,600728,佳都科技,11.29,0.36%","2,002224,三力士,11.18,0.36%","2,002542,中化岩土,11.13,0.36%","2,002779,中坚科技,22.73,0.35%","1,600458,时代新材,11.39,0.35%","2,002745,木林森,37.43,0.35%","2,002496,辉丰股份,5.68,0.35%","2,300098,高新兴,14.15,0.35%","2,000988,华工科技,16.98,0.35%","2,300175,朗源股份,8.85,0.34%","2,300004,南风股份,11.82,0.34%","2,300584,海辰药业,35.27,0.34%","2,002708,光洋股份,8.85,0.34%","2,000531,穗恒运A,8.92,0.34%","2,300380,安硕信息,26.30,0.34%","2,002811,亚泰国际,26.26,0.34%","2,002455,百川股份,11.89,0.34%","2,000521,美菱电器,5.91,0.34%","2,000089,深圳机场,8.91,0.34%","2,000726,鲁泰A,11.96,0.34%","2,300102,乾照光电,9.22,0.33%","1,600336,澳柯玛,6.06,0.33%","2,300237,美晨科技,15.31,0.33%","2,300233,金城医药,21.10,0.33%","1,600433,冠豪高新,6.12,0.33%","2,000822,山东海化,12.29,0.33%","1,600153,建发股份,12.16,0.33%","2,002677,浙江美大,15.37,0.33%","1,600587,新华医疗,18.41,0.33%","2,002312,*ST三泰,6.10,0.33%","2,300027,华谊兄弟,9.09,0.33%","2,300640,德艺文创,30.40,0.33%","2,002538,司尔特,9.14,0.33%","2,000538,云南白药,86.41,0.33%","1,603689,皖天然气,15.13,0.33%","1,600259,广晟有色,49.01,0.33%","1,603929,亚翔集成,21.60,0.33%","2,300629,新劲刚,46.20,0.33%","2,000610,西安旅游,12.15,0.33%","1,600462,九有股份,6.15,0.33%","2,300083,劲胜智能,9.20,0.33%","2,300514,友讯达,30.15,0.33%","1,600069,银鸽投资,9.18,0.33%","2,002232,启明信息,12.03,0.33%","1,603926,铁流股份,31.06,0.32%","1,600751,天海投资,6.33,0.32%","1,603960,克来机电,30.97,0.32%","2,000902,新洋丰,9.47,0.32%","2,002600,江粉磁材,9.37,0.32%","2,300557,理工光科,47.43,0.32%","2,002875,安奈儿,32.61,0.31%","2,300662,科锐国际,22.37,0.31%","2,300020,银江股份,13.09,0.31%","1,600597,光明乳业,13.13,0.31%","1,603826,坤彩科技,19.58,0.31%","1,603098,森特股份,22.96,0.31%","2,000701,厦门信达,13.14,0.31%","2,300182,捷成股份,9.71,0.31%","2,002631,德尔未来,16.31,0.31%","2,002489,浙江永强,6.48,0.31%","1,603019,中科曙光,32.07,0.31%","2,300610,晨化股份,19.65,0.31%","2,000909,数源科技,12.95,0.31%","2,002592,八菱科技,26.30,0.31%","2,000921,海信科龙,13.09,0.31%","1,600966,博汇纸业,6.39,0.31%","1,603730,岱美股份,38.90,0.31%","2,002026,山东威达,9.60,0.31%","2,002319,乐通股份,16.07,0.31%","2,300275,梅安森,16.98,0.30%","1,600380,健康元,9.94,0.30%","1,600854,春兰股份,6.77,0.30%","2,002511,中顺洁柔,13.34,0.30%","1,600859,王府井,16.51,0.30%","2,000786,北新建材,16.53,0.30%","2,002374,丽鹏股份,6.73,0.30%","1,603031,安德利,32.92,0.30%","2,002254,泰和新材,13.21,0.30%","2,300091,金通灵,16.92,0.30%","1,603757,大元泵业,57.00,0.30%","1,600132,重庆啤酒,23.04,0.30%","2,300665,飞鹿股份,30.50,0.30%","2,000881,中广核技,16.66,0.30%","2,300331,苏大维格,23.05,0.30%","1,600356,恒丰纸业,10.26,0.29%","1,601369,陕鼓动力,7.02,0.29%","2,002126,银轮股份,10.36,0.29%","2,002322,理工环科,23.92,0.29%","2,002503,搜于特,6.89,0.29%","2,002206,海利得,6.90,0.29%","1,600167,联美控股,24.24,0.29%","1,603239,浙江仙通,24.07,0.29%","2,000692,惠天热电,6.95,0.29%","2,002648,卫星石化,17.45,0.29%","1,600622,嘉宝集团,17.08,0.29%","2,300671,富满电子,34.28,0.29%","2,300250,初灵信息,17.55,0.29%","1,603999,读者传媒,10.32,0.29%","1,600215,长春经开,10.35,0.29%","1,600220,江苏阳光,3.50,0.29%","2,002244,滨江集团,7.01,0.29%","2,002302,西部建设,21.17,0.28%","2,002372,伟星新材,17.70,0.28%","2,002347,泰尔股份,7.05,0.28%","2,300044,赛为智能,21.36,0.28%","1,601128,常熟银行,10.60,0.28%","2,002775,文科园林,21.37,0.28%","2,000628,高新发展,10.74,0.28%","2,002557,洽洽食品,14.26,0.28%","1,601595,上海电影,24.89,0.28%","2,000430,张家界,10.74,0.28%","1,601058,赛轮金宇,3.54,0.28%","2,002170,芭田股份,7.29,0.28%","2,000823,超声电子,14.41,0.28%","2,002400,省广股份,7.29,0.28%","2,002169,智光电气,7.12,0.28%","1,603803,瑞斯康达,21.77,0.28%","2,002820,桂发祥,32.38,0.28%","2,300094,国联水产,7.07,0.28%","2,002623,亚玛顿,24.98,0.28%","1,603063,禾望电气,25.41,0.28%","2,300579,数字认证,53.50,0.28%","2,300294,博雅生物,35.96,0.28%","1,603358,华达科技,46.59,0.28%","1,600257,大湖股份,7.28,0.28%","1,600317,营口港,3.52,0.28%","2,000757,浩物股份,7.24,0.28%","2,300007,汉威科技,18.00,0.28%","1,601117,中国化学,7.40,0.27%","1,600202,哈空调,10.97,0.27%","2,002171,楚江新材,18.85,0.27%","2,000882,华联股份,3.67,0.27%","2,300226,上海钢联,40.85,0.27%","1,600755,厦门国贸,10.98,0.27%","2,002081,金螳螂,10.96,0.27%","1,600207,安彩高科,7.36,0.27%","1,600545,新疆城建,11.12,0.27%","1,600791,京能置业,11.14,0.27%","2,000707,双环科技,7.36,0.27%","1,600157,永泰能源,3.72,0.27%","2,002501,利源精制,11.10,0.27%","2,002236,大华股份,25.65,0.27%","1,603306,华懋科技,30.59,0.26%","2,300552,万集科技,31.38,0.26%","2,300345,红宇新材,7.62,0.26%","1,600892,大晟文化,11.72,0.26%","2,002883,中设股份,50.58,0.26%","1,603043,广州酒家,23.46,0.26%","2,002859,洁美科技,118.11,0.26%","2,300265,通光线缆,11.45,0.26%","1,600522,中天科技,11.57,0.26%","2,002527,新时达,11.40,0.26%","2,002640,跨境通,19.24,0.26%","2,002024,苏宁云商,11.71,0.26%","2,300005,探路者,7.57,0.26%","2,000530,大冷股份,7.68,0.26%","2,000880,潍柴重机,11.43,0.26%","2,002688,金河生物,7.95,0.25%","1,600797,浙大网新,16.17,0.25%","1,600312,平高电气,11.98,0.25%","1,600847,*ST万里,15.75,0.25%","1,603818,曲美家居,16.04,0.25%","2,002647,民盛金科,36.48,0.25%","2,002412,汉森制药,16.32,0.25%","2,002102,冠福股份,4.00,0.25%","2,000582,北部湾港,12.02,0.25%","2,002317,众生药业,11.92,0.25%","1,600351,亚宝药业,8.15,0.25%","2,000911,南宁糖业,11.85,0.25%","2,300513,恒泰实达,36.13,0.25%","2,002068,黑猫股份,12.14,0.25%","1,600663,陆家嘴,23.82,0.25%","2,300308,中际装备,40.60,0.25%","2,000690,宝新能源,8.05,0.25%","1,601137,博威合金,12.04,0.25%","2,300605,恒锋信息,32.07,0.25%","1,601099,太平洋,4.24,0.24%","2,300263,隆华节能,8.24,0.24%","2,002390,信邦制药,8.37,0.24%","1,601611,中国核建,12.73,0.24%","2,300249,依米康,12.56,0.24%","2,002549,凯美特气,8.24,0.24%","2,000973,佛塑科技,8.46,0.24%","1,600482,中国动力,25.29,0.24%","1,600016,民生银行,8.32,0.24%","2,002344,海宁皮城,8.32,0.24%","1,600313,农发种业,4.12,0.24%","2,000926,福星股份,12.55,0.24%","2,300286,安科瑞,21.13,0.24%","1,600996,贵广网络,12.28,0.24%","2,300180,华峰超纤,25.19,0.24%","1,601801,皖新传媒,12.65,0.24%","1,601186,中国铁建,12.30,0.24%","2,300393,中来股份,42.45,0.24%","2,002439,启明星辰,22.08,0.23%","2,002748,世龙实业,21.48,0.23%","1,600638,新黄浦,17.76,0.23%","2,300373,扬杰科技,21.53,0.23%","1,600818,中路股份,21.75,0.23%","2,300024,机器人,22.17,0.23%","2,002491,通鼎互联,13.27,0.23%","2,002016,世荣兆业,8.76,0.23%","2,002327,富安娜,8.55,0.23%","2,002359,北讯集团,39.49,0.23%","1,601006,大秦铁路,8.86,0.23%","2,002860,星帅尔,43.50,0.23%","2,000897,津滨发展,4.42,0.23%","2,000429,粤高速A,8.61,0.23%","2,002183,怡亚通,8.98,0.22%","2,000615,京汉股份,13.79,0.22%","1,600550,保变电气,9.20,0.22%","2,002151,北斗星通,26.80,0.22%","2,300305,裕兴股份,8.99,0.22%","2,300295,三六五网,23.00,0.22%","1,603979,金诚信,13.70,0.22%","1,600306,商业城,13.91,0.22%","2,002624,完美世界,32.45,0.22%","2,002211,宏达新材,9.18,0.22%","1,600697,欧亚集团,27.83,0.22%","2,300509,新美星,36.20,0.22%","2,002612,朗姿股份,13.88,0.22%","2,002349,精华制药,9.21,0.22%","1,603360,百傲化学,27.43,0.22%","2,002891,中宠股份,40.49,0.22%"],pages:4}'
data_all = top1000_data data_all = data_all.replace('var center_list_data=','') data_all = data_all.replace('data','"data"') data_all = data_all.replace('pages','"pages"') data_all = json.loads(data_all) for data in data_all["data"]: data = data.split(',') code = data[1] codes.append(code)
all_chenbenbi = []
for code in codes: up_data = [] down_data = [] benbi_data = []
url = 'https://m.zhangle.com/servlet/json?funcNo=1003074&stockCode='+code+'&dataTime=20170914' req = urllib2.Request(url) try: response = urllib2.urlopen(req) except: print 'connect error try agian...' try: response = urllib2.urlopen(req) except: print 'connect error try agian and agian...' response = urllib2.urlopen(req) responsedata = response.read()
data = responsedata data = json.loads(data)
chartData = data["resultData"][0]["chartData"] chart_data = chartData.split('|') latestPrice = data["resultData"][0]["latestPrice"] avgCostOfCarry = data["resultData"][0]["avgCostOfCarry"]
del chart_data[0] del chart_data[-1] new_chart_data = chart_data
for item in new_chart_data: item = item.split(';') if float(item[1]) > float(latestPrice) or float(item[1]) == float(latestPrice) : item_total = float(item[1]) * float(item[0]) item_total = float('%.2f' % item_total) up_data.append(item_total) else: item_total = float(item[1]) * float(item[0]) item_total = float('%.2f' % item_total) down_data.append(item_total)
down_total = sum(down_data) up_total = sum(up_data) if up_total == 0: up_total = 1 if down_total == 0: down_total = 1 chenbenbi = down_total / up_total chenbenbi = float('%.2f' % chenbenbi) if chenbenbi > 2 and float(latestPrice) < 25: benbi_data.append(code) benbi_data.append(chenbenbi) all_chenbenbi.append(benbi_data) print all_chenbenbi time.sleep(0.3)
all_chenbenbi.sort(key=itemgetter(1), reverse=True)
xls = xlwt.Workbook() sheet = xls.add_sheet("Sheet1") row = 0 file_name = 'chenben'+now_time + '.xls' for i in range(1,100): sheet.write(row, 0, all_chenbenbi[i][0]) sheet.write(row, 1, all_chenbenbi[i][1]) row += 1 xls.save(file_name)
|