index =0
for data_time in data_times:
reslut = cursor.execute(selete_new_sql, [data_time])
if reslut ==1:
break
index += 1
print(index )
trs.reverse()
for i in range(index):
red_ball = ‘_’.join(trs[i].xpath(‘./td[@class=“chartBa1101”]/text)
bule_ball = trs[i].xpath(’./td[@class=“chartBa1102”]/text[0]
print(“第” + datatime + “红球是:” + red_ball +“绿球是:” + bule_ball)
cursor.execute(sql,[data_time[i], [red_ball], [bule_ball])
client.commit
for data_time in data_time.reverse():
reslut = cursor.execute(selete_new_sql, [data_time])
data = reslut.fetchall()