delete data files.
This commit is contained in:
@ -67,8 +67,9 @@ def fetch_reports_list_general(fetch_func, table_name, s_date, e_date, data_dir_
|
||||
else:
|
||||
logging.warning(f'insert data failed. page : {page}')
|
||||
return False
|
||||
|
||||
utils.save_json_to_file(data, f'{utils.json_data_dir}/{data_dir_prefix}', f'{data_dir_prefix}_report_{page}.json')
|
||||
|
||||
# 写本地json文件,必要性不大
|
||||
#utils.save_json_to_file(data, f'{utils.json_data_dir}/{data_dir_prefix}', f'{data_dir_prefix}_report_{page}.json')
|
||||
|
||||
logging.info(f"第 {page} 页, 获取 {len(data['data'])} 条数据, 共 {max_pages} 页")
|
||||
page += 1
|
||||
|
||||
@ -5,6 +5,7 @@ import time
|
||||
import csv
|
||||
import logging
|
||||
from datetime import datetime
|
||||
import config
|
||||
|
||||
tbl_stock = 'reports_stock'
|
||||
tbl_new_stock = 'reports_newstrock'
|
||||
@ -12,7 +13,7 @@ tbl_strategy = 'reports_strategy'
|
||||
tbl_macresearch = 'reports_macresearch'
|
||||
tbl_industry = 'reports_industry'
|
||||
|
||||
json_data_dir = './json_data'
|
||||
json_data_dir = f'{config.global_host_data_dir}/em_reports/json_data'
|
||||
|
||||
# 保存 JSON 数据到本地文件
|
||||
def save_json_to_file(data, file_path, file_name):
|
||||
|
||||
Reference in New Issue
Block a user