Commit 138b90ca authored by litaolemo's avatar litaolemo

update

parent 32a274b2
...@@ -58,7 +58,7 @@ def send_email_tome(): ...@@ -58,7 +58,7 @@ def send_email_tome():
# f.write(out_path) # f.write(out_path)
# f.close() # f.close()
# zipFile = '昨日数据统计结果.xls' # zipFile = '昨日数据统计结果.xls'
send_file_email("", "", email_group=["litao@igengmei.com"], title_str=content send_file_email("", "", email_group=["‎<duanyingrong@igengmei.com>","<litao@igengmei.com>"], title_str=content
, email_msg_body_str=content, file=zipFile) , email_msg_body_str=content, file=zipFile)
except Exception as e: except Exception as e:
print(e) print(e)
...@@ -314,7 +314,7 @@ if __name__ == "__main__": ...@@ -314,7 +314,7 @@ if __name__ == "__main__":
# WritrExcel().write_excel(path, tuple(all_data_day)) # WritrExcel().write_excel(path, tuple(all_data_day))
# print(u'创建demo.xls文件成功') # print(u'创建demo.xls文件成功')
date = datetime.datetime.now().date() - datetime.timedelta(days=35) date = datetime.datetime.now().date() - datetime.timedelta(days=15)
sql = 'select keywords,sum(sorted) as nums,sum(uv) as uvs from api_search_words where is_delete = 0 and create_time >= "' + str( sql = 'select keywords,sum(sorted) as nums,sum(uv) as uvs from api_search_words where is_delete = 0 and create_time >= "' + str(
date) + '" group by keywords order by nums desc' date) + '" group by keywords order by nums desc'
...@@ -336,7 +336,7 @@ if __name__ == "__main__": ...@@ -336,7 +336,7 @@ if __name__ == "__main__":
for item in tag_names_list_week: for item in tag_names_list_week:
all_data_week.append(tuple(item)) all_data_week.append(tuple(item))
path = "近一月数据统计结果.xls" path = "近2周数据统计结果.xls"
WritrExcel().write_excel(path, tuple(all_data_week)) WritrExcel().write_excel(path, tuple(all_data_week))
print(u'创建demo.xls文件成功') print(u'创建demo.xls文件成功')
......
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