Commit 5fc29e90 authored by litaolemo's avatar litaolemo

update

parent 54e2dfac
...@@ -64,9 +64,9 @@ if __name__ == "__main__": ...@@ -64,9 +64,9 @@ if __name__ == "__main__":
word, nums, uv, date_str = item word, nums, uv, date_str = item
partition_date = date_str partition_date = date_str
pid = hashlib.md5((partition_date+word).encode("utf8")).hexdigest() pid = hashlib.md5((partition_date+word).encode("utf8")).hexdigest()
insert_sql = (word, nums, uv, pid, date_str) insert_sql_tuple = (word, nums, uv, pid, date_str)
insert_list.append(insert_sql) insert_list.append(insert_sql_tuple)
print(insert_sql) # print(insert_sql)
if count % 100 == 0: if count % 100 == 0:
# cursor.execute("set names 'UTF8'") # cursor.execute("set names 'UTF8'")
res = cursor.executemany(insert_sql,insert_list) res = cursor.executemany(insert_sql,insert_list)
......
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