Commit b81bb38b authored by litaolemo's avatar litaolemo

update

parent 57e5b204
......@@ -20,14 +20,15 @@ def con_sql(sql):
db.close()
return result
sql = "select id,question_id,platform from api_answer where platform in (2,0,9) limit 2"
res_list = [("id","question_id","platform")]
sql = "select id,question_id,platform from api_answer where platform in (2,0,9)"
result = con_sql(sql)
for r in result:
print(r)
res_list.append(r)
import pandas
from crawler.maintenance.func_send_email_with_file import send_file_email
data = pandas.DataFrame(res_list)
data.to_excel("./data_file.xlsx")
send_file_email("", '', sender="litao@igengmei.com", email_group=["litao@igengmei.com"], email_msg_body_str="test",
title_str="test", cc_group=["litao@igengmei.com"], file="/srv/apps/meta_base_code/second_demands.csv")
title_str="test", cc_group=["litao@igengmei.com"], file="./data_file.xlsx")
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