Commit 1459da5a authored by litaolemo's avatar litaolemo

update

parent 133175f8
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
import pymysql import pymysql
import xlwt, datetime import xlwt, datetime
from maintenance.func_send_email_with_file import send_file_email from maintenance.func_send_email_with_file import send_file_email
import zipfile # import zipfile
import redis import redis
from pyhive import hive # from pyhive import hive
from maintenance.func_send_email_with_file import send_file_email from maintenance.func_send_email_with_file import send_file_email
from typing import Dict, List from typing import Dict, List
from elasticsearch import Elasticsearch from elasticsearch import Elasticsearch
...@@ -385,7 +385,7 @@ def get_how_word_crawler_count(data_index, start_ts, end_ts, week_num, last_week ...@@ -385,7 +385,7 @@ def get_how_word_crawler_count(data_index, start_ts, end_ts, week_num, last_week
return res_data return res_data
def get_keyword_ctr(hive,start_ts,end_ts): def get_keyword_ctr(start_ts,end_ts):
start_date = datetime.datetime.fromtimestamp(start_ts/1e3) start_date = datetime.datetime.fromtimestamp(start_ts/1e3)
end_date = datetime.datetime.fromtimestamp(end_ts/1e3) end_date = datetime.datetime.fromtimestamp(end_ts/1e3)
start_date_str = start_date.strftime("%Y%m%d") start_date_str = start_date.strftime("%Y%m%d")
...@@ -474,4 +474,4 @@ if __name__ == "__main__": ...@@ -474,4 +474,4 @@ if __name__ == "__main__":
# exl.save_excel(path) # exl.save_excel(path)
# print(u'创建demo.xls文件成功') # print(u'创建demo.xls文件成功')
# send_email_tome() # send_email_tome()
word_count = get_keyword_ctr(hive, start_ts, end_ts) word_count = get_keyword_ctr(start_ts, end_ts)
\ No newline at end of file \ 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