Commit 8dd114a0 authored by 王浩's avatar 王浩

fix read excel

parent 12f7dae4
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -11,7 +11,7 @@ PAGE_SIZE = 100
def read_excel():
wb = open_workbook(filename='/Users/apple/Desktop/nice_tag20181225.xlsx')
wb = open_workbook(filename='/Users/haowei/Desktop/nice_tag20181225.xlsx')
sheet1 = wb.sheet_by_index(0)
......@@ -27,7 +27,7 @@ def read_excel():
def create_tags(tags):
url='http://127.0.0.1:8090/api/v1/create_tag_for_batch'
url='http://39.107.208.122:80/api/v1/create_tag_for_batch'
post_data = json.dumps(tags)
textmod= {"tags": post_data}
......@@ -44,10 +44,6 @@ def process():
count = math.ceil(len(tags) / PAGE_SIZE)
print(count)
for i in range(0, count):
if i == 5:
break
if i < 4:
continue
print(i)
item = tags[PAGE_SIZE * i: PAGE_SIZE * i + PAGE_SIZE]
# print(item, len(item))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment