Commit 9fa57722 authored by lixiaofang's avatar lixiaofang

add

parent 8efe5979
This diff is collapsed.
...@@ -10,15 +10,6 @@ from auto_request import host, user, db, passwd ...@@ -10,15 +10,6 @@ from auto_request import host, user, db, passwd
auto_reply_url = "http://47.93.162.11:8085/api/v1/reply/create_for_inner" auto_reply_url = "http://47.93.162.11:8085/api/v1/reply/create_for_inner"
# 对所有马甲生产的帖子(包含历史帖子)
#
# 离线一次性插入{0,4}条评论
#
# 评论取自评论库,并自动随机关联马甲
#
# 注意需要禁止本帖作者评论
def reply(id, content, user_id): def reply(id, content, user_id):
try: try:
post_dict = { post_dict = {
...@@ -84,7 +75,7 @@ if __name__ == "__main__": ...@@ -84,7 +75,7 @@ if __name__ == "__main__":
for id in topic_id: for id in topic_id:
rand_num = random.randint(0, 4) rand_num = random.randint(0, 3)
for i in range(rand_num): for i in range(rand_num):
......
#
#
import datetime # import datetime
#
now = datetime.datetime.now() # now = datetime.datetime.now()
#
yes_time = now - datetime.timedelta(days=2) # yes_time = now - datetime.timedelta(days=2)
yes_time_str = yes_time.strftime('%Y-%m-%d') # yes_time_str = yes_time.strftime('%Y-%m-%d')
yes_time_str = yes_time_str+' 23:59:59.000000' # yes_time_str = yes_time_str+' 23:59:59.000000'
#
yes_time2 = now - datetime.timedelta(days=0) # yes_time2 = now - datetime.timedelta(days=0)
yes_time_str2 = yes_time2.strftime('%Y-%m-%d') # yes_time_str2 = yes_time2.strftime('%Y-%m-%d')
yes_time_str2 = yes_time_str2+' 00:00:00.000000' # yes_time_str2 = yes_time_str2+' 00:00:00.000000'
#
print(yes_time_str) # print(yes_time_str)
print(yes_time_str2) # print(yes_time_str2)
\ No newline at end of file import random
rand_num = random.randint(0,2)
print(rand_num)
\ 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 to comment