def getvalue4(): pamasex = [1,2] pamaminage = 0 pamaage = 66 pamayears = [1,3,5,10,20] duration = [55,60,65,70] lists = [] for sex in pamasex: for years in pamayears: for i in range(pamaminage,pamaage): for md in duration: print sex,i,years,md str1 = postdata(opener,"http://app.winbaoxian.com/planBook/calculate",getp4(sex,i,years,md),cookie) print str1 mresult = json.loads(str1) if str(mresult['data']['retcode']) == '0': mdict = list() mdict.append(sex) mdict.append(i) mdict.append(years) mdict.append(md) mdict.append(mresult['data']['outNum']['608']['name']) mdict.append(mresult['data']['outNum']['608']['baoe']) mdict.append(mresult['data']['outNum']['608']['baof']) mdict.append(mresult['data']['outNum']['608']['duration']) mdict.append(mresult['data']['outNum']['608']['jiaofei']) lists.append(mdict) time.sleep(0.2) #time.sleep(2) #time.sleep(2) excel.writevalue(lists) print len(lists) return
def getvalue(): pamasex = [1, 2] pamaminage = 0 pamaage = 56 pamayears = [1, 3, 5, 10, 15, 20, 30] lists = [] for sex in pamasex: for years in pamayears: for i in range(pamaminage, pamaage): print sex, years, i str1 = postdata( opener, "http://app.winbaoxian.com/planBook/calculate", getp(sex, i, years), cookie) print str1 mresult = json.loads(str1) if str(mresult['data']['retcode']) == '0': mdict = list() mdict.append(sex) mdict.append(i) mdict.append(years) mdict.append(mresult['data']['outNum']['5075']['name']) mdict.append(mresult['data']['outNum']['5075']['baoe']) mdict.append(mresult['data']['outNum']['5075']['baof']) mdict.append(mresult['data']['outNum']['5075']['jiaofei']) mdict.append(mresult['data']['outNum']['5076']['name']) mdict.append(mresult['data']['outNum']['5076']['baoe']) mdict.append(mresult['data']['outNum']['5076']['baof']) mdict.append(mresult['data']['outNum']['5076']['jiaofei']) mdict.append(mresult['data']['outNum']['baofMainTotal']) lists.append(mdict) time.sleep(0.2) excel.writevalue(lists) print len(lists) return
def getvalue(): pamasex = [1,2] pamaminage = 0 pamaage = 56 pamayears = [1,3,5,10,15,20,30] lists = [] for sex in pamasex: for years in pamayears: for i in range(pamaminage,pamaage): print sex,years,i str1 = postdata(opener,"http://app.winbaoxian.com/planBook/calculate",getp(sex,i,years),cookie) print str1 mresult = json.loads(str1) if str(mresult['data']['retcode']) == '0': mdict = list() mdict.append(sex) mdict.append(i) mdict.append(years) mdict.append(mresult['data']['outNum']['5075']['name']) mdict.append(mresult['data']['outNum']['5075']['baoe']) mdict.append(mresult['data']['outNum']['5075']['baof']) mdict.append(mresult['data']['outNum']['5075']['jiaofei']) mdict.append(mresult['data']['outNum']['5076']['name']) mdict.append(mresult['data']['outNum']['5076']['baoe']) mdict.append(mresult['data']['outNum']['5076']['baof']) mdict.append(mresult['data']['outNum']['5076']['jiaofei']) mdict.append(mresult['data']['outNum']['baofMainTotal']) lists.append(mdict) time.sleep(0.2) excel.writevalue(lists) print len(lists) return
def getvalue4(): pamasex = [1, 2] pamaminage = 0 pamaage = 66 pamayears = [1, 3, 5, 10, 20] duration = [55, 60, 65, 70] lists = [] for sex in pamasex: for years in pamayears: for i in range(pamaminage, pamaage): for md in duration: print sex, i, years, md str1 = postdata( opener, "http://app.winbaoxian.com/planBook/calculate", getp4(sex, i, years, md), cookie) print str1 mresult = json.loads(str1) if str(mresult['data']['retcode']) == '0': mdict = list() mdict.append(sex) mdict.append(i) mdict.append(years) mdict.append(md) mdict.append(mresult['data']['outNum']['608']['name']) mdict.append(mresult['data']['outNum']['608']['baoe']) mdict.append(mresult['data']['outNum']['608']['baof']) mdict.append( mresult['data']['outNum']['608']['duration']) mdict.append( mresult['data']['outNum']['608']['jiaofei']) lists.append(mdict) time.sleep(0.2) #time.sleep(2) #time.sleep(2) excel.writevalue(lists) print len(lists) return