Commit 78b8fc9a authored by 张彦钊's avatar 张彦钊

change test file

parent 0f3cdc3d
...@@ -86,15 +86,22 @@ def tag_boost(cid_str, tag_list=[15,21,22,85,86]): ...@@ -86,15 +86,22 @@ def tag_boost(cid_str, tag_list=[15,21,22,85,86]):
cursor = db.cursor() cursor = db.cursor()
cursor.execute(sql) cursor.execute(sql)
result = cursor.fetchall() result = cursor.fetchall()
print(result) if len(result) > 0:
# if len(result) > 0: tag_cids = {}
# cid_tag = {} left_cids = []
# for i in result: for i in result:
# cid_tag[i[0]] = i[1] tmp = i[1].split(",")
# if tag_cids[i[0]] = tmp
# left_cids.extend(tmp)
# else: print(tag_cids)
# return cid_str left_cids = list(set(left_cids))
right_cids = [i for i in cids if i not in left_cids]
print(len(left_cids))
print(len(right_cids))
print(cids)
else:
return cid_str
else: else:
return cid_str return cid_str
else: else:
......
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