Commit 549f93b7 by 岳巧源

add attr

parent 806bac94
Showing with 5 additions and 6 deletions
......@@ -133,9 +133,9 @@ def insert_pop_attr_to_db():
password=config["mysql"]["password"])
cursor = db.cursor()
cursor.execute(query=select_sql)
result = cursor.fetchall()
for i in range(len(result)):
class_id = result[i][0]
db_result = cursor.fetchall()
for i in range(len(db_result)):
class_id = db_result[i][0]
ans = get_pop_attr(class_id)
result = ans["jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"]["findattrsbycategoryidunlimitcate_result"]
for j in range(len(result)):
......@@ -189,5 +189,4 @@ def insert_pop_attr_to_db():
if __name__ == '__main__':
ans = get_pop_attr(33593)
print(json.dumps(ans, ensure_ascii=False))
\ No newline at end of file
insert_pop_attr_to_db()
\ 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