作者在 2016-10-19 10:27:15 发布以下内容
eslid = open(r"D:\test.txt").readlines()
for line in eslid:
line = line.strip('\n')
print server.send_cmd('ESL_QUERY_REALTIME',[{"eslid":line}])
def jb1(self):
print 'jb1 start' +ctime()
n = 0
jb1_eslid = open(r".\118.txt").readlines() #数据格式为eslid+sku。中间不需要空格
while True:
for i in jb1_eslid:
n = n +1
i = i.strip('\n')
k = requests.post("http://192.168.4.88:8080/shopweb/bind",data=str([{"eslId": i[0:11],"goodsId":i[11:]}]),cookies = cookies)
# print i
time.sleep(6)
if n % 64 == 0:
print n
# time.sleep(2)
time.sleep(21600)