Commit 8d82f4a4 by 岳巧源

add attr

parent b862635f
Showing with 8 additions and 7 deletions
...@@ -41,7 +41,7 @@ def insert_class_of_attr(class_id: int): ...@@ -41,7 +41,7 @@ def insert_class_of_attr(class_id: int):
app_secret=app_secret, app_secret=app_secret,
param={"category_leaf_id": class_id} param={"category_leaf_id": class_id}
) )
# print(json.dumps(data, ensure_ascii=False)) print(json.dumps(data, ensure_ascii=False))
if "result" not in data["jingdong_vc_item_props_find_responce"]["jos_result_dto"]: if "result" not in data["jingdong_vc_item_props_find_responce"]["jos_result_dto"]:
return return
results = data["jingdong_vc_item_props_find_responce"]["jos_result_dto"]["result"] results = data["jingdong_vc_item_props_find_responce"]["jos_result_dto"]["result"]
...@@ -136,8 +136,9 @@ def insert_class_of_ext_attr(class_id: int): ...@@ -136,8 +136,9 @@ def insert_class_of_ext_attr(class_id: int):
if __name__ == '__main__': if __name__ == '__main__':
class_ids = get_class_ids() # class_ids = get_class_ids()
for i in range(len(class_ids)): # for i in range(len(class_ids)):
class_id = class_ids[i] # class_id = class_ids[i]
insert_class_of_attr(class_id) # insert_class_of_attr(class_id)
insert_class_of_ext_attr(class_id) # insert_class_of_ext_attr(class_id)
\ No newline at end of file insert_class_of_attr(15818)
\ No newline at end of file
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 sign in to comment